@popmenu/dashboard 0.126.0 → 0.126.2

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 (79) hide show
  1. package/build/{components → cjs/components}/ClickableTile/ClickableTile.d.ts +8 -8
  2. package/build/{components → cjs/components}/ClickableTile/ClickableTileProps.d.ts +8 -8
  3. package/build/{components → cjs/components}/ClickableTile/ClickableTileStyles.d.ts +1 -1
  4. package/build/{components → cjs/components}/DashboardContainer/DashboardContainer.d.ts +3 -3
  5. package/build/{components → cjs/components}/DashboardContainer/index.d.ts +1 -1
  6. package/build/{components → cjs/components}/KpiMetric/KpiMetric.d.ts +12 -12
  7. package/build/{components → cjs/components}/KpiMetric/KpiMetricProps.d.ts +15 -15
  8. package/build/{components → cjs/components}/KpiMetric/KpiMetricStyles.d.ts +2 -2
  9. package/build/{components → cjs/components}/KpiMetric/index.d.ts +2 -2
  10. package/build/{components → cjs/components}/KpiMetricTile/KpiMetricTile.d.ts +3 -3
  11. package/build/{components → cjs/components}/KpiMetricTile/KpiMetricTileProps.d.ts +6 -6
  12. package/build/{components → cjs/components}/KpiMetricTile/index.d.ts +2 -2
  13. package/build/{components → cjs/components}/Leaderboard/Leaderboard.d.ts +3 -3
  14. package/build/{components → cjs/components}/Leaderboard/LeaderboardProps.d.ts +56 -56
  15. package/build/{components → cjs/components}/Leaderboard/LeaderboardStyles.d.ts +5 -5
  16. package/build/{components → cjs/components}/Leaderboard/index.d.ts +2 -2
  17. package/build/{components → cjs/components}/LeaderboardTile/LeaderboardTile.d.ts +3 -3
  18. package/build/{components → cjs/components}/LeaderboardTile/LeaderboardTileProps.d.ts +5 -5
  19. package/build/{components → cjs/components}/LeaderboardTile/index.d.ts +2 -2
  20. package/build/{components → cjs/components}/Tile/Tile.d.ts +3 -3
  21. package/build/{components → cjs/components}/Tile/TileProps.d.ts +8 -8
  22. package/build/{components → cjs/components}/Tile/TileStyles.d.ts +1 -1
  23. package/build/{components → cjs/components}/Tile/index.d.ts +2 -2
  24. package/build/{components → cjs/components}/index.d.ts +5 -5
  25. package/build/{index.d.ts → cjs/index.d.ts} +1 -1
  26. package/build/cjs/index.js +224 -0
  27. package/build/cjs/index.js.map +1 -0
  28. package/build/esm/components/ClickableTile/ClickableTile.d.ts +8 -0
  29. package/build/esm/components/ClickableTile/ClickableTile.js +18 -0
  30. package/build/esm/components/ClickableTile/ClickableTile.js.map +1 -0
  31. package/build/esm/components/ClickableTile/ClickableTileProps.d.ts +8 -0
  32. package/build/esm/components/ClickableTile/ClickableTileStyles.d.ts +1 -0
  33. package/build/esm/components/ClickableTile/ClickableTileStyles.js +16 -0
  34. package/build/esm/components/ClickableTile/ClickableTileStyles.js.map +1 -0
  35. package/build/esm/components/DashboardContainer/DashboardContainer.d.ts +3 -0
  36. package/build/esm/components/DashboardContainer/index.d.ts +1 -0
  37. package/build/esm/components/KpiMetric/KpiMetric.d.ts +12 -0
  38. package/build/esm/components/KpiMetric/KpiMetric.js +28 -0
  39. package/build/esm/components/KpiMetric/KpiMetric.js.map +1 -0
  40. package/build/esm/components/KpiMetric/KpiMetricProps.d.ts +15 -0
  41. package/build/esm/components/KpiMetric/KpiMetricStyles.d.ts +2 -0
  42. package/build/esm/components/KpiMetric/KpiMetricStyles.js +30 -0
  43. package/build/esm/components/KpiMetric/KpiMetricStyles.js.map +1 -0
  44. package/build/esm/components/KpiMetric/index.d.ts +2 -0
  45. package/build/esm/components/KpiMetricTile/KpiMetricTile.d.ts +3 -0
  46. package/build/esm/components/KpiMetricTile/KpiMetricTile.js +15 -0
  47. package/build/esm/components/KpiMetricTile/KpiMetricTile.js.map +1 -0
  48. package/build/esm/components/KpiMetricTile/KpiMetricTileProps.d.ts +6 -0
  49. package/build/esm/components/KpiMetricTile/index.d.ts +2 -0
  50. package/build/esm/components/Leaderboard/Leaderboard.d.ts +3 -0
  51. package/build/esm/components/Leaderboard/Leaderboard.js +78 -0
  52. package/build/esm/components/Leaderboard/Leaderboard.js.map +1 -0
  53. package/build/esm/components/Leaderboard/LeaderboardProps.d.ts +56 -0
  54. package/build/esm/components/Leaderboard/LeaderboardStyles.d.ts +5 -0
  55. package/build/esm/components/Leaderboard/LeaderboardStyles.js +44 -0
  56. package/build/esm/components/Leaderboard/LeaderboardStyles.js.map +1 -0
  57. package/build/esm/components/Leaderboard/index.d.ts +2 -0
  58. package/build/esm/components/LeaderboardTile/LeaderboardTile.d.ts +3 -0
  59. package/build/esm/components/LeaderboardTile/LeaderboardTile.js +13 -0
  60. package/build/esm/components/LeaderboardTile/LeaderboardTile.js.map +1 -0
  61. package/build/esm/components/LeaderboardTile/LeaderboardTileProps.d.ts +5 -0
  62. package/build/esm/components/LeaderboardTile/index.d.ts +2 -0
  63. package/build/esm/components/Tile/Tile.d.ts +3 -0
  64. package/build/esm/components/Tile/Tile.js +14 -0
  65. package/build/esm/components/Tile/Tile.js.map +1 -0
  66. package/build/esm/components/Tile/TileProps.d.ts +8 -0
  67. package/build/esm/components/Tile/TileStyles.d.ts +1 -0
  68. package/build/esm/components/Tile/TileStyles.js +15 -0
  69. package/build/esm/components/Tile/TileStyles.js.map +1 -0
  70. package/build/esm/components/Tile/index.d.ts +2 -0
  71. package/build/esm/components/index.d.ts +5 -0
  72. package/build/esm/index.d.ts +1 -0
  73. package/build/esm/index.js +6 -0
  74. package/build/esm/index.js.map +1 -0
  75. package/package.json +8 -5
  76. package/build/index.es.js +0 -1138
  77. package/build/index.es.js.map +0 -1
  78. package/build/index.js +0 -1185
  79. package/build/index.js.map +0 -1
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
2
- import { ClickableTileProps } from './ClickableTileProps';
3
- export declare const ClickableTile: {
4
- (props: ClickableTileProps): JSX.Element;
5
- defaultProps: {
6
- link: boolean;
7
- };
8
- };
1
+ /// <reference types="react" />
2
+ import { ClickableTileProps } from './ClickableTileProps';
3
+ export declare const ClickableTile: {
4
+ (props: ClickableTileProps): JSX.Element;
5
+ defaultProps: {
6
+ link: boolean;
7
+ };
8
+ };
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
2
- import { TileProps } from '../Tile';
3
- export interface ClickableTileProps extends TileProps {
4
- /** transforms the root DOM node an anchor element when true */
5
- link: boolean;
6
- /** callback invoked for a click event */
7
- onClick: (event: React.MouseEvent<HTMLDivElement | HTMLAnchorElement>) => void;
8
- }
1
+ /// <reference types="react" />
2
+ import { TileProps } from '../Tile';
3
+ export interface ClickableTileProps extends TileProps {
4
+ /** transforms the root DOM node an anchor element when true */
5
+ link: boolean;
6
+ /** callback invoked for a click event */
7
+ onClick: (event: React.MouseEvent<HTMLDivElement | HTMLAnchorElement>) => void;
8
+ }
@@ -1 +1 @@
1
- export declare const useClickableTileStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"root" | "content">;
1
+ export declare const useClickableTileStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"root" | "content">;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- import { BoxProps as DashboardContainerProps } from '@popmenu/common-ui';
3
- export declare const DashboardContainer: (props: DashboardContainerProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { BoxProps as DashboardContainerProps } from '@popmenu/common-ui';
3
+ export declare const DashboardContainer: (props: DashboardContainerProps) => JSX.Element;
@@ -1 +1 @@
1
- export { DashboardContainer } from './DashboardContainer';
1
+ export { DashboardContainer } from './DashboardContainer';
@@ -1,12 +1,12 @@
1
- /// <reference types="react" />
2
- import { KpiMetricProps } from './KpiMetricProps';
3
- declare const defaultProps: {
4
- trendStatus: string;
5
- };
6
- export declare const KpiMetric: {
7
- (props: KpiMetricProps & typeof defaultProps): JSX.Element;
8
- defaultProps: {
9
- trendStatus: string;
10
- };
11
- };
12
- export {};
1
+ /// <reference types="react" />
2
+ import { KpiMetricProps } from './KpiMetricProps';
3
+ declare const defaultProps: {
4
+ trendStatus: string;
5
+ };
6
+ export declare const KpiMetric: {
7
+ (props: KpiMetricProps & typeof defaultProps): JSX.Element;
8
+ defaultProps: {
9
+ trendStatus: string;
10
+ };
11
+ };
12
+ export {};
@@ -1,15 +1,15 @@
1
- import React from 'react';
2
- export interface KpiMetricProps {
3
- /** The icon from @popmenu/web-icons to be rendered */
4
- Icon?: string | React.FC<React.SVGProps<SVGSVGElement>>;
5
- /** A KPI metric name */
6
- metric: string;
7
- /** A KPI metric measurement */
8
- value: string | undefined;
9
- /** A KPI metric trend direction */
10
- trend: 'up' | 'down' | 'level' | undefined;
11
- /** A KPI metric trend description */
12
- trendMessage: string | undefined;
13
- /** Determines if the trend direction is diplayed as success or warning. When "natural", a trend of "up" is successful*/
14
- trendStatus: 'natural' | 'inverted' | undefined;
15
- }
1
+ import React from 'react';
2
+ export interface KpiMetricProps {
3
+ /** The icon from @popmenu/web-icons to be rendered */
4
+ Icon?: string | React.FC<React.SVGProps<SVGSVGElement>>;
5
+ /** A KPI metric name */
6
+ metric: string;
7
+ /** A KPI metric measurement */
8
+ value: string | undefined;
9
+ /** A KPI metric trend direction */
10
+ trend: 'up' | 'down' | 'level' | undefined;
11
+ /** A KPI metric trend description */
12
+ trendMessage: string | undefined;
13
+ /** Determines if the trend direction is diplayed as success or warning. When "natural", a trend of "up" is successful*/
14
+ trendStatus: 'natural' | 'inverted' | undefined;
15
+ }
@@ -1,2 +1,2 @@
1
- import { KpiMetricProps } from './KpiMetricProps';
2
- export declare const useKpiMetricStyles: (props: KpiMetricProps) => import("@material-ui/styles").ClassNameMap<string>;
1
+ import { KpiMetricProps } from './KpiMetricProps';
2
+ export declare const useKpiMetricStyles: (props: KpiMetricProps) => import("@material-ui/styles").ClassNameMap<string>;
@@ -1,2 +1,2 @@
1
- export { KpiMetric } from './KpiMetric';
2
- export { KpiMetricProps } from './KpiMetricProps';
1
+ export { KpiMetric } from './KpiMetric';
2
+ export { KpiMetricProps } from './KpiMetricProps';
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- import { KpiMetricTileProps } from './KpiMetricTileProps';
3
- export declare const KpiMetricTile: (props: KpiMetricTileProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { KpiMetricTileProps } from './KpiMetricTileProps';
3
+ export declare const KpiMetricTile: (props: KpiMetricTileProps) => JSX.Element;
@@ -1,6 +1,6 @@
1
- import { ClickableTileProps } from '../ClickableTile/ClickableTileProps';
2
- import { KpiMetricProps } from '../KpiMetric/KpiMetricProps';
3
- import { TileProps } from '../Tile';
4
- export interface KpiMetricTileProps extends KpiMetricProps {
5
- TileProps: TileProps | ClickableTileProps;
6
- }
1
+ import { ClickableTileProps } from '../ClickableTile/ClickableTileProps';
2
+ import { KpiMetricProps } from '../KpiMetric/KpiMetricProps';
3
+ import { TileProps } from '../Tile';
4
+ export interface KpiMetricTileProps extends KpiMetricProps {
5
+ TileProps: TileProps | ClickableTileProps;
6
+ }
@@ -1,2 +1,2 @@
1
- export { KpiMetricTile } from './KpiMetricTile';
2
- export { KpiMetricTileProps } from './KpiMetricTileProps';
1
+ export { KpiMetricTile } from './KpiMetricTile';
2
+ export { KpiMetricTileProps } from './KpiMetricTileProps';
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- import { LeaderboardProps } from './LeaderboardProps';
3
- export declare const Leaderboard: (props: LeaderboardProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { LeaderboardProps } from './LeaderboardProps';
3
+ export declare const Leaderboard: (props: LeaderboardProps) => JSX.Element;
@@ -1,56 +1,56 @@
1
- /// <reference types="react" />
2
- import { MenuProps } from '@material-ui/core';
3
- export interface LeaderboardFilterOptionProps {
4
- label: string;
5
- value: string;
6
- }
7
- export interface LeaderboardFilterProps extends MenuProps {
8
- onChange: (event: any) => void;
9
- options: LeaderboardFilterOptionProps[];
10
- text: string;
11
- }
12
- export interface LeaderboardListItemProps {
13
- /** The icon to be displayed. Should be an icon component from popmenu/web-icons */
14
- Icon?: string | React.FC<React.SVGProps<SVGSVGElement>>;
15
- /** The image to be displayed. */
16
- image?: {
17
- /** alt attribute for the html img. */
18
- alt: string;
19
- /** src attribute for the html img. */
20
- src: string;
21
- };
22
- /** Index used for styling */
23
- index: number;
24
- /** The subtitle to be displayed */
25
- subtitle?: string;
26
- /** The title to be displayed */
27
- title: string;
28
- /** Optional link to be attached to the list item */
29
- to?: string;
30
- }
31
- export interface LeaderboardProps {
32
- /** Data to be shown for each leaderboard list item */
33
- data: LeaderboardListItemProps[];
34
- /** Component to display when no data is present */
35
- EmptyState: React.ReactNode;
36
- /** Optional props for filter after the title/subtitle */
37
- filterProps: LeaderboardFilterProps;
38
- /** Optional link at bottom to redirect to another page. Intended as a link to more data within the leaderboard. */
39
- moreLink?: {
40
- /** Will display regardless of overflow */
41
- show?: boolean;
42
- /** Path to route to. */
43
- to: string;
44
- /** Text the link will have. */
45
- text: string;
46
- };
47
- /** Subtitle to be displayed */
48
- subtitle: string;
49
- /** The title to be displayed */
50
- title: string;
51
- }
52
- export interface MoreLinkProps {
53
- show?: boolean;
54
- text: string;
55
- to: string;
56
- }
1
+ /// <reference types="react" />
2
+ import { MenuProps } from '@material-ui/core';
3
+ export interface LeaderboardFilterOptionProps {
4
+ label: string;
5
+ value: string;
6
+ }
7
+ export interface LeaderboardFilterProps extends MenuProps {
8
+ onChange: (event: any) => void;
9
+ options: LeaderboardFilterOptionProps[];
10
+ text: string;
11
+ }
12
+ export interface LeaderboardListItemProps {
13
+ /** The icon to be displayed. Should be an icon component from popmenu/web-icons */
14
+ Icon?: string | React.FC<React.SVGProps<SVGSVGElement>>;
15
+ /** The image to be displayed. */
16
+ image?: {
17
+ /** alt attribute for the html img. */
18
+ alt: string;
19
+ /** src attribute for the html img. */
20
+ src: string;
21
+ };
22
+ /** Index used for styling */
23
+ index: number;
24
+ /** The subtitle to be displayed */
25
+ subtitle?: string;
26
+ /** The title to be displayed */
27
+ title: string;
28
+ /** Optional link to be attached to the list item */
29
+ to?: string;
30
+ }
31
+ export interface LeaderboardProps {
32
+ /** Data to be shown for each leaderboard list item */
33
+ data: LeaderboardListItemProps[];
34
+ /** Component to display when no data is present */
35
+ EmptyState: React.ReactNode;
36
+ /** Optional props for filter after the title/subtitle */
37
+ filterProps: LeaderboardFilterProps;
38
+ /** Optional link at bottom to redirect to another page. Intended as a link to more data within the leaderboard. */
39
+ moreLink?: {
40
+ /** Will display regardless of overflow */
41
+ show?: boolean;
42
+ /** Path to route to. */
43
+ to: string;
44
+ /** Text the link will have. */
45
+ text: string;
46
+ };
47
+ /** Subtitle to be displayed */
48
+ subtitle: string;
49
+ /** The title to be displayed */
50
+ title: string;
51
+ }
52
+ export interface MoreLinkProps {
53
+ show?: boolean;
54
+ text: string;
55
+ to: string;
56
+ }
@@ -1,5 +1,5 @@
1
- import { LeaderboardProps, LeaderboardListItemProps, LeaderboardFilterProps, MoreLinkProps } from './LeaderboardProps';
2
- export declare const useLeaderboardStyles: (props: LeaderboardProps) => import("@material-ui/styles").ClassNameMap<string>;
3
- export declare const useLeaderboardListItemStyles: (props: LeaderboardListItemProps) => import("@material-ui/styles").ClassNameMap<string>;
4
- export declare const useLeaderboardFilterStyles: (props: LeaderboardFilterProps) => import("@material-ui/styles").ClassNameMap<string>;
5
- export declare const useMoreLinkStyles: (props: MoreLinkProps) => import("@material-ui/styles").ClassNameMap<string>;
1
+ import { LeaderboardProps, LeaderboardListItemProps, LeaderboardFilterProps, MoreLinkProps } from './LeaderboardProps';
2
+ export declare const useLeaderboardStyles: (props: LeaderboardProps) => import("@material-ui/styles").ClassNameMap<string>;
3
+ export declare const useLeaderboardListItemStyles: (props: LeaderboardListItemProps) => import("@material-ui/styles").ClassNameMap<string>;
4
+ export declare const useLeaderboardFilterStyles: (props: LeaderboardFilterProps) => import("@material-ui/styles").ClassNameMap<string>;
5
+ export declare const useMoreLinkStyles: (props: MoreLinkProps) => import("@material-ui/styles").ClassNameMap<string>;
@@ -1,2 +1,2 @@
1
- export { Leaderboard } from './Leaderboard';
2
- export { LeaderboardProps } from './LeaderboardProps';
1
+ export { Leaderboard } from './Leaderboard';
2
+ export { LeaderboardProps } from './LeaderboardProps';
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- import { LeaderboardTileProps } from './LeaderboardTileProps';
3
- export declare const LeaderboardTile: (props: LeaderboardTileProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { LeaderboardTileProps } from './LeaderboardTileProps';
3
+ export declare const LeaderboardTile: (props: LeaderboardTileProps) => JSX.Element;
@@ -1,5 +1,5 @@
1
- import { TileProps } from '../Tile/TileProps';
2
- import { LeaderboardProps } from '../Leaderboard/LeaderboardProps';
3
- export interface LeaderboardTileProps extends LeaderboardProps {
4
- TileProps: TileProps;
5
- }
1
+ import { TileProps } from '../Tile/TileProps';
2
+ import { LeaderboardProps } from '../Leaderboard/LeaderboardProps';
3
+ export interface LeaderboardTileProps extends LeaderboardProps {
4
+ TileProps: TileProps;
5
+ }
@@ -1,2 +1,2 @@
1
- export { LeaderboardTile } from './LeaderboardTile';
2
- export { LeaderboardTileProps } from './LeaderboardTileProps';
1
+ export { LeaderboardTile } from './LeaderboardTile';
2
+ export { LeaderboardTileProps } from './LeaderboardTileProps';
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- import { TileProps } from './TileProps';
3
- export declare const Tile: (props: TileProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { TileProps } from './TileProps';
3
+ export declare const Tile: (props: TileProps) => JSX.Element;
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
2
- import { CardProps, CardContentProps } from '@popmenu/common-ui';
3
- export interface TileProps extends CardProps {
4
- /** Props applied to the built in CardContent component */
5
- CardContentProps?: CardContentProps;
6
- /** Content of the Tile */
7
- children?: React.ReactNode;
8
- }
1
+ /// <reference types="react" />
2
+ import { CardProps, CardContentProps } from '@popmenu/common-ui';
3
+ export interface TileProps extends CardProps {
4
+ /** Props applied to the built in CardContent component */
5
+ CardContentProps?: CardContentProps;
6
+ /** Content of the Tile */
7
+ children?: React.ReactNode;
8
+ }
@@ -1 +1 @@
1
- export declare const useTileStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"root" | "content">;
1
+ export declare const useTileStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"root" | "content">;
@@ -1,2 +1,2 @@
1
- export { Tile } from './Tile';
2
- export { TileProps } from './TileProps';
1
+ export { Tile } from './Tile';
2
+ export { TileProps } from './TileProps';
@@ -1,5 +1,5 @@
1
- export { Leaderboard, LeaderboardProps } from './Leaderboard';
2
- export { LeaderboardTile, LeaderboardTileProps } from './LeaderboardTile';
3
- export { KpiMetric, KpiMetricProps } from './KpiMetric';
4
- export { KpiMetricTile, KpiMetricTileProps } from './KpiMetricTile';
5
- export { Tile, TileProps } from './Tile';
1
+ export { Leaderboard, LeaderboardProps } from './Leaderboard';
2
+ export { LeaderboardTile, LeaderboardTileProps } from './LeaderboardTile';
3
+ export { KpiMetric, KpiMetricProps } from './KpiMetric';
4
+ export { KpiMetricTile, KpiMetricTileProps } from './KpiMetricTile';
5
+ export { Tile, TileProps } from './Tile';
@@ -1 +1 @@
1
- export * from './components';
1
+ export * from './components';
@@ -0,0 +1,224 @@
1
+ 'use strict';
2
+
3
+ var tslib = require('tslib');
4
+ var React = require('react');
5
+ var core = require('@material-ui/core');
6
+ var commonUi = require('@popmenu/common-ui');
7
+ var reactRouterDom = require('react-router-dom');
8
+ var webIcons = require('@popmenu/web-icons');
9
+
10
+ var useLeaderboardStyles = core.makeStyles(function (theme) { return ({
11
+ root: {
12
+ '& >:nth-child(even) > li': {
13
+ background: theme.palette.grey[100],
14
+ },
15
+ },
16
+ }); });
17
+ var useLeaderboardListItemStyles = core.makeStyles(function (theme) { return ({
18
+ fallbackIcon: {
19
+ background: 'white',
20
+ border: "1px solid " + theme.palette.grey[300],
21
+ color: theme.palette.grey[500],
22
+ },
23
+ link: {
24
+ color: theme.palette.info.main,
25
+ textDecoration: 'none',
26
+ },
27
+ subtitle: {
28
+ color: theme.palette.secondary.light,
29
+ },
30
+ }); });
31
+ var useLeaderboardFilterStyles = core.makeStyles(function (theme) { return ({
32
+ filterWrapper: {
33
+ alignItems: 'center',
34
+ cursor: 'pointer',
35
+ display: 'flex',
36
+ },
37
+ text: {
38
+ color: theme.palette.secondary.main,
39
+ fontSize: '.75rem',
40
+ paddingRight: theme.spacing(1),
41
+ },
42
+ }); });
43
+ var useMoreLinkStyles = core.makeStyles(function (theme) { return ({
44
+ link: {
45
+ color: theme.palette.info.main,
46
+ textDecoration: 'none',
47
+ },
48
+ }); });
49
+
50
+ var Leaderboard = function (props) {
51
+ var data = props.data, EmptyState = props.EmptyState, filterProps = props.filterProps, title = props.title, moreLink = props.moreLink, subtitle = props.subtitle;
52
+ var classes = useLeaderboardStyles(props);
53
+ var isEmpty = data.length === 0;
54
+ var slicedData = data.slice(0, 5);
55
+ var isOverflow = data.length > 5;
56
+ var showMoreButton = !isEmpty && ((moreLink === null || moreLink === void 0 ? void 0 : moreLink.show) || isOverflow);
57
+ return (React.createElement(commonUi.Box, { display: "flex", flexDirection: "column" },
58
+ React.createElement(commonUi.Box, { alignItems: "left" },
59
+ React.createElement(commonUi.Typography, { variant: "h5" }, title),
60
+ React.createElement(commonUi.Typography, { className: classes.text }, subtitle),
61
+ filterProps && React.createElement(LeaderboardFilter, tslib.__assign({}, filterProps))),
62
+ !isEmpty ? (React.createElement(commonUi.List, { classes: classes }, slicedData.map(function (itemProps, index) { return (React.createElement(LeaderboardListItem, tslib.__assign({ key: "tile-list-item-" + index }, itemProps))); }))) : (EmptyState),
63
+ moreLink && showMoreButton && React.createElement(MoreLink, { text: moreLink.text, to: moreLink.to })));
64
+ };
65
+ var LeaderboardListItem = function (props) {
66
+ var ItemIcon = props.Icon, image = props.image, to = props.to, subtitle = props.subtitle, title = props.title;
67
+ var classes = useLeaderboardListItemStyles(props);
68
+ var routeProps = { component: reactRouterDom.Link, to: to };
69
+ var showListItemAvatar = image || ItemIcon;
70
+ return (React.createElement(commonUi.Box, tslib.__assign({}, (to && routeProps), { className: to && routeProps ? classes.link : '' }),
71
+ React.createElement(commonUi.ListItem, null,
72
+ showListItemAvatar && (React.createElement(commonUi.ListItemAvatar, null,
73
+ React.createElement(commonUi.Avatar, tslib.__assign({ classes: { colorDefault: classes.fallbackIcon } }, image), ItemIcon && React.createElement(commonUi.Icon, { icon: ItemIcon })))),
74
+ React.createElement(commonUi.ListItemText, { classes: { secondary: classes.subtitle }, primary: title, primaryTypographyProps: {
75
+ noWrap: true,
76
+ }, secondary: subtitle }))));
77
+ };
78
+ var LeaderboardFilter = function (props) {
79
+ var onChange = props.onChange, options = props.options, text = props.text;
80
+ var classes = useLeaderboardFilterStyles(props);
81
+ var _a = React.useState(false), open = _a[0], setOpen = _a[1];
82
+ var _b = React.useState(null), menuAnchor = _b[0], setMenuAnchor = _b[1];
83
+ var _c = React.useState(null), selection = _c[0], setSelection = _c[1];
84
+ var handleOpen = function (event) {
85
+ setMenuAnchor(event.currentTarget);
86
+ setOpen(true);
87
+ };
88
+ var handleClose = function () {
89
+ setMenuAnchor(null);
90
+ setOpen(false);
91
+ };
92
+ var handleSelection = function (label, value) {
93
+ if (typeof onChange === 'function') {
94
+ onChange(value);
95
+ }
96
+ setSelection(label);
97
+ handleClose();
98
+ };
99
+ if (options.length < 1)
100
+ return null;
101
+ return (React.createElement(React.Fragment, null,
102
+ React.createElement(commonUi.Box, { className: classes.filterWrapper, pt: 1, onClick: handleOpen },
103
+ React.createElement(commonUi.Typography, { className: classes.text }, selection || text),
104
+ React.createElement(commonUi.Icon, { icon: webIcons.ChevronDown })),
105
+ React.createElement(core.Menu, { anchorEl: menuAnchor, onClose: handleClose, open: open }, options.map(function (_a) {
106
+ var label = _a.label, value = _a.value;
107
+ return (React.createElement(core.MenuItem, { key: value, onClick: function () { return handleSelection(label, value); } }, label));
108
+ }))));
109
+ };
110
+ var MoreLink = function (props) {
111
+ var text = props.text, to = props.to;
112
+ var classes = useMoreLinkStyles(props);
113
+ var routeProps = { component: reactRouterDom.Link, to: to };
114
+ return (React.createElement(commonUi.Box, tslib.__assign({ display: "flex", justifyContent: "center" }, routeProps, { className: classes.link }),
115
+ React.createElement(commonUi.Typography, { variant: "body2" }, text)));
116
+ };
117
+
118
+ var useTileStyles = core.makeStyles(function (theme) { return ({
119
+ root: {
120
+ borderRadius: theme.spacing(1),
121
+ width: '100%',
122
+ },
123
+ content: {
124
+ padding: theme.spacing(3),
125
+ height: '100%',
126
+ },
127
+ }); });
128
+
129
+ var Tile = function (props) {
130
+ var children = props.children, CardContentProps = props.CardContentProps, restProps = tslib.__rest(props, ["children", "CardContentProps"]);
131
+ var classes = useTileStyles(props);
132
+ return (React.createElement(commonUi.Card, tslib.__assign({ classes: { root: classes.root } }, restProps),
133
+ React.createElement(commonUi.CardContent, tslib.__assign({ classes: { root: classes.content } }, CardContentProps), children)));
134
+ };
135
+
136
+ var LeaderboardTile = function (props) {
137
+ var TileProps = props.TileProps, restProps = tslib.__rest(props, ["TileProps"]);
138
+ return (React.createElement(Tile, tslib.__assign({}, TileProps),
139
+ React.createElement(Leaderboard, tslib.__assign({}, restProps))));
140
+ };
141
+
142
+ var useKpiMetricStyles = core.makeStyles(function (theme) { return ({
143
+ iconContainer: {
144
+ fontSize: theme.spacing(3),
145
+ display: 'flex',
146
+ backgroundColor: theme.palette.grey[100],
147
+ color: theme.palette.secondary.light,
148
+ borderRadius: '50%',
149
+ padding: theme.spacing(2),
150
+ marginBottom: theme.spacing(2),
151
+ },
152
+ root: {
153
+ display: 'flex',
154
+ flexDirection: 'column',
155
+ alignItems: 'center',
156
+ height: '100%',
157
+ justifyContent: 'space-between',
158
+ textAlign: 'center',
159
+ fontSize: '0.75rem',
160
+ },
161
+ trendIcon: {
162
+ '&&': {
163
+ paddingInlineEnd: theme.spacing(1),
164
+ },
165
+ },
166
+ }); });
167
+
168
+ var defaultProps = {
169
+ trendStatus: 'natural',
170
+ };
171
+ var KpiMetric = function (props) {
172
+ var KpiIcon = props.Icon, metric = props.metric, value = props.value, trend = props.trend, trendMessage = props.trendMessage, trendStatus = props.trendStatus;
173
+ var classes = useKpiMetricStyles(props);
174
+ var trendColors = trendStatus === 'natural' ? ['success', 'warning', 'grey.500'] : ['warning', 'success', 'grey.500'];
175
+ var trendColorMap = { up: 0, down: 1, level: 2 };
176
+ return (React.createElement(commonUi.Box, { className: classes.root },
177
+ KpiIcon && (React.createElement(commonUi.Box, { className: classes.iconContainer },
178
+ React.createElement(commonUi.Icon, { icon: KpiIcon, size: "inherit" }))),
179
+ React.createElement(commonUi.Typography, { color: "secondary.light", variant: "body2" }, metric),
180
+ React.createElement(commonUi.Typography, { color: "secondary", variant: "h4" }, value ? value : '-'),
181
+ trendMessage && (React.createElement(commonUi.Typography, { style: { fontSize: 'inherit' }, variant: "body2", color: trend ? trendColors[trendColorMap[trend]] : 'grey.500' },
182
+ trend === 'up' && React.createElement(commonUi.Icon, { className: classes.trendIcon, icon: webIcons.Trend, size: "inherit" }),
183
+ trend === 'down' && React.createElement(commonUi.Icon, { className: classes.trendIcon, icon: webIcons.TrendDown, size: "inherit" }),
184
+ trend === 'level' && React.createElement(commonUi.Icon, { className: classes.trendIcon, icon: webIcons.GitCommit, size: "inherit" }),
185
+ trendMessage))));
186
+ };
187
+ KpiMetric.defaultProps = defaultProps;
188
+
189
+ var useClickableTileStyles = core.makeStyles(function (theme) { return ({
190
+ root: {
191
+ textDecoration: 'none',
192
+ borderRadius: theme.spacing(1),
193
+ width: '100%',
194
+ },
195
+ content: {
196
+ padding: theme.spacing(3),
197
+ height: '100%',
198
+ },
199
+ }); });
200
+
201
+ var ClickableTile = function (props) {
202
+ var children = props.children, CardContentProps = props.CardContentProps, link = props.link, restProps = tslib.__rest(props, ["children", "CardContentProps", "link"]);
203
+ var classes = useClickableTileStyles(props);
204
+ return (React.createElement(core.Card, tslib.__assign({ classes: { root: classes.root } }, restProps),
205
+ React.createElement(core.CardActionArea, { component: link ? 'a' : 'div' },
206
+ React.createElement(core.CardContent, tslib.__assign({ classes: { root: classes.content } }, CardContentProps), children))));
207
+ };
208
+ ClickableTile.defaultProps = {
209
+ link: false,
210
+ };
211
+
212
+ var KpiMetricTile = function (props) {
213
+ var TileProps = props.TileProps, restProps = tslib.__rest(props, ["TileProps"]);
214
+ var DynamicTile = typeof (TileProps === null || TileProps === void 0 ? void 0 : TileProps.onClick) === 'function' ? ClickableTile : Tile;
215
+ return (React.createElement(DynamicTile, tslib.__assign({}, TileProps),
216
+ React.createElement(KpiMetric, tslib.__assign({}, restProps))));
217
+ };
218
+
219
+ exports.KpiMetric = KpiMetric;
220
+ exports.KpiMetricTile = KpiMetricTile;
221
+ exports.Leaderboard = Leaderboard;
222
+ exports.LeaderboardTile = LeaderboardTile;
223
+ exports.Tile = Tile;
224
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../src/components/Leaderboard/LeaderboardStyles.ts","../../src/components/Leaderboard/Leaderboard.tsx","../../src/components/Tile/TileStyles.ts","../../src/components/Tile/Tile.tsx","../../src/components/LeaderboardTile/LeaderboardTile.tsx","../../src/components/KpiMetric/KpiMetricStyles.ts","../../src/components/KpiMetric/KpiMetric.tsx","../../src/components/ClickableTile/ClickableTileStyles.ts","../../src/components/ClickableTile/ClickableTile.tsx","../../src/components/KpiMetricTile/KpiMetricTile.tsx"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null],"names":["makeStyles","Box","Typography","__assign","List","RouterLink","ListItem","ListItemAvatar","Avatar","Icon","ListItemText","useState","ChevronDown","Menu","MenuItem","__rest","Card","CardContent","Trend","TrendDown","GitCommit","CardActionArea"],"mappings":";;;;;;;;;AAGO,IAAM,oBAAoB,GAAGA,eAAU,CAA0B,UAAC,KAAK,EAAK,EAAA,QAAC;AAClF,IAAA,IAAI,EAAE;AACJ,QAAA,0BAA0B,EAAE;YAC1B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;AACpC,SAAA;AACF,KAAA;CACF,EAAC,EAAA,CAAC;AAEI,IAAM,4BAA4B,GAAGA,eAAU,CAAkC,UAAC,KAAK,EAAK,EAAA,QAAC;AAClG,IAAA,YAAY,EAAE;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// <reference types="react" />
2
+ import { ClickableTileProps } from './ClickableTileProps';
3
+ export declare const ClickableTile: {
4
+ (props: ClickableTileProps): JSX.Element;
5
+ defaultProps: {
6
+ link: boolean;
7
+ };
8
+ };