@conboai/storybook.components 0.4.31 → 0.4.32
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/assets/styles/colors.d.ts +1 -0
- package/dist/build/index.d.ts +1 -0
- package/dist/components/CustomDataGrid/CustomDataGrid.d.ts +1 -0
- package/dist/components/DetailsViewPanel/DetailsViewPanel.d.ts +1 -1
- package/dist/components/ImagePlayer/ImagePlayer.d.ts +3 -0
- package/dist/components/MapPlayer/MapPlayer.d.ts +45 -0
- package/dist/components/MapPlayer/index.d.ts +1 -0
- package/dist/components/MapPlayer/styles.d.ts +26 -0
- package/dist/components/MetroMap/MetroMap.d.ts +8 -1
- package/dist/components/MetroMap/MetroMapUtils.d.ts +17 -1
- package/dist/components/Shapes/Shapes.d.ts +1 -1
- package/dist/components/Svg/icons.d.ts +12 -0
- package/dist/components/TabsBox/styles.d.ts +4 -0
- package/dist/components/VerticalTable/styles.d.ts +7 -1
- package/dist/interfaces/detailsView.d.ts +2 -0
- package/dist/interfaces/tabsContainer.d.ts +10 -1
- package/dist/storybook.components.mjs +36732 -35964
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ export declare const HIGHLIGHT_COLOR = "#a0a6cf";
|
|
|
12
12
|
export declare const TICK_COLOR = "#666666";
|
|
13
13
|
export declare const SELECTED_ROW = "#f5f5f7";
|
|
14
14
|
export declare const TIMELINE = "#808080";
|
|
15
|
+
export declare const DANGER = "#ff3535";
|
|
15
16
|
export declare const PASSIVE_BTN_PRIMARY = "#5360AE";
|
|
16
17
|
export declare const HOVER_BTN_PRIMARY = "#3F4C9A";
|
|
17
18
|
export declare const ACTIVE_BTN_PRIMARY = "#303D8B";
|
package/dist/build/index.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export { Shapes } from '../components/Shapes';
|
|
|
36
36
|
export { CustomDataGrid } from '../components/CustomDataGrid';
|
|
37
37
|
export { SearchBox } from '../components/SearchBox';
|
|
38
38
|
export { ImagePlayer } from '../components/ImagePlayer';
|
|
39
|
+
export { MapPlayer } from '../components/MapPlayer';
|
|
39
40
|
export * from '../interfaces/filter';
|
|
40
41
|
export * from '../interfaces/tab';
|
|
41
42
|
export * from '../interfaces/detailsView';
|
|
@@ -22,6 +22,7 @@ export interface CustomDataGridProps {
|
|
|
22
22
|
csvFileName?: string;
|
|
23
23
|
csvHeaders?: string[];
|
|
24
24
|
csvDataFormatter?: (value: any, column: GridColDef) => string;
|
|
25
|
+
useClientSorting?: boolean;
|
|
25
26
|
}
|
|
26
27
|
declare const CustomDataGrid: FC<CustomDataGridProps>;
|
|
27
28
|
export default CustomDataGrid;
|
|
@@ -20,6 +20,9 @@ export interface ImagePlayerProps {
|
|
|
20
20
|
shapeStyles?: any;
|
|
21
21
|
clearFrameDetails?: () => void;
|
|
22
22
|
fetchFrameDetails?: (snapshot: Snapshot) => void;
|
|
23
|
+
delay?: string;
|
|
24
|
+
onClear?: () => void;
|
|
25
|
+
showDirection?: boolean;
|
|
23
26
|
}
|
|
24
27
|
declare const ImagePlayer: React.FC<ImagePlayerProps>;
|
|
25
28
|
export default ImagePlayer;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
export interface MapPlayerProps {
|
|
5
|
+
data: any[];
|
|
6
|
+
initialCenter: {
|
|
7
|
+
lat: number;
|
|
8
|
+
lng: number;
|
|
9
|
+
};
|
|
10
|
+
onChange?: (location: {
|
|
11
|
+
id: string;
|
|
12
|
+
type: string;
|
|
13
|
+
time: string;
|
|
14
|
+
coordinates: {
|
|
15
|
+
lng: number;
|
|
16
|
+
lat: number;
|
|
17
|
+
}[];
|
|
18
|
+
}) => void;
|
|
19
|
+
onInitialLoad?: (location: {
|
|
20
|
+
id: string;
|
|
21
|
+
type: string;
|
|
22
|
+
time: string;
|
|
23
|
+
coordinates: {
|
|
24
|
+
lng: number;
|
|
25
|
+
lat: number;
|
|
26
|
+
}[];
|
|
27
|
+
}) => void;
|
|
28
|
+
loading?: boolean;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
sx?: SxProps;
|
|
31
|
+
clearFrameDetails?: () => void;
|
|
32
|
+
fetchFrameDetails?: (location: {
|
|
33
|
+
id: string;
|
|
34
|
+
type: string;
|
|
35
|
+
time: string;
|
|
36
|
+
coordinates: {
|
|
37
|
+
lng: number;
|
|
38
|
+
lat: number;
|
|
39
|
+
}[];
|
|
40
|
+
}) => void;
|
|
41
|
+
delay?: string;
|
|
42
|
+
onClear?: () => void;
|
|
43
|
+
}
|
|
44
|
+
declare const MapPlayer: React.FC<MapPlayerProps>;
|
|
45
|
+
export default MapPlayer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as MapPlayer } from './MapPlayer';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
export declare const boxWrapperSx: SxProps;
|
|
4
|
+
export declare const boxContentSx: SxProps;
|
|
5
|
+
export declare const getIconBtnSx: (disabled?: boolean) => SxProps;
|
|
6
|
+
export declare const getTimeSx: (disabled?: boolean) => SxProps;
|
|
7
|
+
export declare const cardMediaSx: SxProps;
|
|
8
|
+
export declare const loaderSx: SxProps;
|
|
9
|
+
export declare const loaderContainerSx: {
|
|
10
|
+
position: string;
|
|
11
|
+
top: number;
|
|
12
|
+
left: number;
|
|
13
|
+
width: string;
|
|
14
|
+
height: string;
|
|
15
|
+
display: string;
|
|
16
|
+
justifyContent: string;
|
|
17
|
+
alignItems: string;
|
|
18
|
+
backgroundColor: string;
|
|
19
|
+
zIndex: number;
|
|
20
|
+
};
|
|
21
|
+
export declare const imageContainerSx: {
|
|
22
|
+
position: string;
|
|
23
|
+
display: string;
|
|
24
|
+
justifyContent: string;
|
|
25
|
+
alignItems: string;
|
|
26
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Pollution } from './MetroMapUtils';
|
|
1
2
|
import { default as React } from 'react';
|
|
2
3
|
|
|
3
4
|
interface IMetroMap {
|
|
@@ -13,24 +14,30 @@ interface IMetroMap {
|
|
|
13
14
|
svgAttributes?: {
|
|
14
15
|
[key: string]: string;
|
|
15
16
|
};
|
|
17
|
+
showFullNames?: boolean;
|
|
18
|
+
isMap?: boolean;
|
|
19
|
+
pollutions?: Pollution[];
|
|
16
20
|
}
|
|
17
21
|
interface IElement {
|
|
18
22
|
tag: string;
|
|
19
23
|
id: string;
|
|
24
|
+
text?: string;
|
|
20
25
|
attributes: {
|
|
21
26
|
[key: string]: string;
|
|
22
27
|
};
|
|
23
28
|
onClick?: () => void;
|
|
24
29
|
onMouseEnter?: () => void;
|
|
25
30
|
fill?: string;
|
|
31
|
+
stroke?: string;
|
|
26
32
|
key?: string | number;
|
|
27
33
|
style?: {
|
|
28
34
|
pointerEvents?: string;
|
|
29
35
|
display?: string;
|
|
36
|
+
textAnchor?: string;
|
|
30
37
|
};
|
|
31
38
|
children: IElement[];
|
|
32
39
|
className?: string;
|
|
33
40
|
}
|
|
34
|
-
declare function MetroMap({ elements, onSelect, selectedCluster, minor, major, isMultiSelect, onHover, svgAttributes }: IMetroMap): React.JSX.Element | null;
|
|
41
|
+
declare function MetroMap({ elements, onSelect, selectedCluster, minor, major, isMultiSelect, onHover, svgAttributes, showFullNames, isMap, pollutions }: IMetroMap): React.JSX.Element | null;
|
|
35
42
|
declare const _default: React.MemoExoticComponent<typeof MetroMap>;
|
|
36
43
|
export default _default;
|
|
@@ -3,6 +3,7 @@ type zipResponse = {
|
|
|
3
3
|
filename: string;
|
|
4
4
|
};
|
|
5
5
|
declare const startsWithAny: (testString: string, prefixes: string[]) => boolean;
|
|
6
|
+
declare const isIdSelected: (testString: string, selectedIds: string[]) => boolean;
|
|
6
7
|
declare const getParsedSvgViewsFromZip: (zip: File) => Promise<{
|
|
7
8
|
menu: {
|
|
8
9
|
[x: string]: any;
|
|
@@ -12,4 +13,19 @@ declare const getParsedSvgViewsFromZip: (zip: File) => Promise<{
|
|
|
12
13
|
declare const extractZip: (file: File) => Promise<zipResponse[]>;
|
|
13
14
|
declare function extractPrefix(inputString: string, prefix: string): string;
|
|
14
15
|
declare const parseSvg: (svg: string) => Promise<any>;
|
|
15
|
-
|
|
16
|
+
declare const pollutionPreffixes: string[];
|
|
17
|
+
declare const hasPollutionPrefix: (id: string) => boolean;
|
|
18
|
+
export type PollutionColors = "red" | "green" | "yellow";
|
|
19
|
+
export type Pollution = {
|
|
20
|
+
id: string;
|
|
21
|
+
value: PollutionColors;
|
|
22
|
+
text: string;
|
|
23
|
+
};
|
|
24
|
+
export declare enum PollutionBgColors {
|
|
25
|
+
red = "#EB5757",
|
|
26
|
+
yellow = "#FFD301",
|
|
27
|
+
green = "#63B759"
|
|
28
|
+
}
|
|
29
|
+
declare const handlePollutionFill: (id: string, color: PollutionColors) => string | null;
|
|
30
|
+
declare const findPollutionByIdPrefix: (id: string, pollutions: Pollution[]) => Pollution | undefined;
|
|
31
|
+
export { parseSvg, extractPrefix, extractZip, getParsedSvgViewsFromZip, startsWithAny, isIdSelected, pollutionPreffixes, hasPollutionPrefix, findPollutionByIdPrefix, handlePollutionFill };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { IShapesProps } from './types';
|
|
3
3
|
|
|
4
|
-
declare const Shapes: ({ children, mode: modeFromProps, onModeChange: _onModeChange, shapes: shapesFromProps, selected, onShapeChange, onShapeSelect, onMouseMove, menu, showNumbers, showId, showOnlyPoints, showPoints, showDirection, selectedShapeZIndex, styles }: IShapesProps) => React.JSX.Element;
|
|
4
|
+
declare const Shapes: ({ children, mode: modeFromProps, onModeChange: _onModeChange, shapes: shapesFromProps, selected, onShapeChange, onShapeSelect, onMouseMove, menu, showNumbers, showId, showOnlyPoints, showPoints, showDirection, selectedShapeZIndex, styles, }: IShapesProps) => React.JSX.Element;
|
|
5
5
|
export default Shapes;
|
|
@@ -58,6 +58,18 @@ interface Icons {
|
|
|
58
58
|
portalOutIcon: Icon;
|
|
59
59
|
timeIcon: Icon;
|
|
60
60
|
horizontalArrowIcon: Icon;
|
|
61
|
+
oneForward: Icon;
|
|
62
|
+
fiveForward: Icon;
|
|
63
|
+
tenForward: Icon;
|
|
64
|
+
oneReplay: Icon;
|
|
65
|
+
fiveReplay: Icon;
|
|
66
|
+
tenReplay: Icon;
|
|
67
|
+
xOne: Icon;
|
|
68
|
+
xFive: Icon;
|
|
69
|
+
xTen: Icon;
|
|
70
|
+
doubleArrow: Icon;
|
|
71
|
+
oneArrowUp: Icon;
|
|
72
|
+
oneArrowDown: Icon;
|
|
61
73
|
}
|
|
62
74
|
interface Icon {
|
|
63
75
|
paths: string[];
|
|
@@ -4,10 +4,13 @@ export declare const tableCellBody: SxProps;
|
|
|
4
4
|
export declare const tableCellHeaderSx: SxProps;
|
|
5
5
|
export declare const tableContainerSx: (sx?: SxProps) => {
|
|
6
6
|
boxShadow: string;
|
|
7
|
+
fontSize: string;
|
|
7
8
|
} | {
|
|
8
9
|
boxShadow: string;
|
|
10
|
+
fontSize: string;
|
|
9
11
|
} | {
|
|
10
12
|
boxShadow: string;
|
|
13
|
+
fontSize: string;
|
|
11
14
|
accentColor?: import('@mui/system').SystemStyleObject<{}> | import('@mui/system/styleFunctionSx').ResponsiveStyleValue<import("csstype").Property.AccentColor | readonly string[] | undefined> | ((theme: {}) => import('@mui/system/styleFunctionSx').ResponsiveStyleValue<import("csstype").Property.AccentColor | readonly string[] | undefined>);
|
|
12
15
|
alignContent?: import('@mui/system').SystemStyleObject<{}> | import('@mui/system/styleFunctionSx').ResponsiveStyleValue<readonly string[] | import("csstype").Property.AlignContent | undefined> | ((theme: {}) => import('@mui/system/styleFunctionSx').ResponsiveStyleValue<readonly string[] | import("csstype").Property.AlignContent | undefined>);
|
|
13
16
|
alignItems?: import('@mui/system').SystemStyleObject<{}> | import('@mui/system/styleFunctionSx').ResponsiveStyleValue<readonly string[] | import("csstype").Property.AlignItems | undefined> | ((theme: {}) => import('@mui/system/styleFunctionSx').ResponsiveStyleValue<readonly string[] | import("csstype").Property.AlignItems | undefined>);
|
|
@@ -137,7 +140,6 @@ export declare const tableContainerSx: (sx?: SxProps) => {
|
|
|
137
140
|
fontLanguageOverride?: import('@mui/system').SystemStyleObject<{}> | import('@mui/system/styleFunctionSx').ResponsiveStyleValue<readonly string[] | import("csstype").Property.FontLanguageOverride | undefined> | ((theme: {}) => import('@mui/system/styleFunctionSx').ResponsiveStyleValue<readonly string[] | import("csstype").Property.FontLanguageOverride | undefined>);
|
|
138
141
|
fontOpticalSizing?: import('@mui/system').SystemStyleObject<{}> | import('@mui/system/styleFunctionSx').ResponsiveStyleValue<import("csstype").Property.FontOpticalSizing | readonly NonNullable<import("csstype").Property.FontOpticalSizing | undefined>[] | undefined> | ((theme: {}) => import('@mui/system/styleFunctionSx').ResponsiveStyleValue<import("csstype").Property.FontOpticalSizing | readonly NonNullable<import("csstype").Property.FontOpticalSizing | undefined>[] | undefined>);
|
|
139
142
|
fontPalette?: import('@mui/system').SystemStyleObject<{}> | import('@mui/system/styleFunctionSx').ResponsiveStyleValue<readonly string[] | import("csstype").Property.FontPalette | undefined> | ((theme: {}) => import('@mui/system/styleFunctionSx').ResponsiveStyleValue<readonly string[] | import("csstype").Property.FontPalette | undefined>);
|
|
140
|
-
fontSize?: import('@mui/system').SystemStyleObject<{}> | import('@mui/system/styleFunctionSx').ResponsiveStyleValue<import("csstype").Property.FontSize<string | number> | readonly NonNullable<import("csstype").Property.FontSize<string | number> | undefined>[] | undefined> | ((theme: {}) => import('@mui/system/styleFunctionSx').ResponsiveStyleValue<import("csstype").Property.FontSize<string | number> | readonly NonNullable<import("csstype").Property.FontSize<string | number> | undefined>[] | undefined>);
|
|
141
143
|
fontSizeAdjust?: import('@mui/system').SystemStyleObject<{}> | import('@mui/system/styleFunctionSx').ResponsiveStyleValue<import("csstype").Property.FontSizeAdjust | readonly NonNullable<import("csstype").Property.FontSizeAdjust | undefined>[] | undefined> | ((theme: {}) => import('@mui/system/styleFunctionSx').ResponsiveStyleValue<import("csstype").Property.FontSizeAdjust | readonly NonNullable<import("csstype").Property.FontSizeAdjust | undefined>[] | undefined>);
|
|
142
144
|
fontSmooth?: import('@mui/system').SystemStyleObject<{}> | import('@mui/system/styleFunctionSx').ResponsiveStyleValue<import("csstype").Property.FontSmooth<string | number> | readonly NonNullable<import("csstype").Property.FontSmooth<string | number> | undefined>[] | undefined> | ((theme: {}) => import('@mui/system/styleFunctionSx').ResponsiveStyleValue<import("csstype").Property.FontSmooth<string | number> | readonly NonNullable<import("csstype").Property.FontSmooth<string | number> | undefined>[] | undefined>);
|
|
143
145
|
fontStretch?: import('@mui/system').SystemStyleObject<{}> | import('@mui/system/styleFunctionSx').ResponsiveStyleValue<readonly string[] | import("csstype").Property.FontStretch | undefined> | ((theme: {}) => import('@mui/system/styleFunctionSx').ResponsiveStyleValue<readonly string[] | import("csstype").Property.FontStretch | undefined>);
|
|
@@ -855,6 +857,7 @@ export declare const tableContainerSx: (sx?: SxProps) => {
|
|
|
855
857
|
displayPrint?: import('@mui/system').SystemStyleObject<{}> | import('@mui/system/styleFunctionSx').ResponsiveStyleValue<readonly string[] | import("csstype").Property.Display | undefined> | ((theme: {}) => import('@mui/system/styleFunctionSx').ResponsiveStyleValue<readonly string[] | import("csstype").Property.Display | undefined>);
|
|
856
858
|
} | {
|
|
857
859
|
boxShadow: string;
|
|
860
|
+
fontSize: string;
|
|
858
861
|
":-moz-any()"?: import('@mui/system').SystemStyleObject<{}> | ((theme: {}) => import('@mui/system').SystemStyleObject<{}>) | undefined;
|
|
859
862
|
":-moz-dir"?: import('@mui/system').SystemStyleObject<{}> | ((theme: {}) => import('@mui/system').SystemStyleObject<{}>) | undefined;
|
|
860
863
|
":-webkit-any()"?: import('@mui/system').SystemStyleObject<{}> | ((theme: {}) => import('@mui/system').SystemStyleObject<{}>) | undefined;
|
|
@@ -989,10 +992,13 @@ export declare const tableContainerSx: (sx?: SxProps) => {
|
|
|
989
992
|
":visited"?: import('@mui/system').SystemStyleObject<{}> | ((theme: {}) => import('@mui/system').SystemStyleObject<{}>) | undefined;
|
|
990
993
|
} | {
|
|
991
994
|
boxShadow: string;
|
|
995
|
+
fontSize: string;
|
|
992
996
|
} | {
|
|
993
997
|
boxShadow: string;
|
|
998
|
+
fontSize: string;
|
|
994
999
|
} | {
|
|
995
1000
|
boxShadow: string;
|
|
1001
|
+
fontSize: string;
|
|
996
1002
|
length: number;
|
|
997
1003
|
toString(): string;
|
|
998
1004
|
toLocaleString(): string;
|
|
@@ -2,6 +2,8 @@ import { TypeTabsContent, TypeTabsContainer } from './tabsContainer';
|
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
|
|
4
4
|
export interface IDetailsView {
|
|
5
|
+
handleMouseDown?: (e: React.MouseEvent) => void;
|
|
6
|
+
isResizing?: any;
|
|
5
7
|
tabsContent: TypeTabsContent;
|
|
6
8
|
tabs: TypeTabsContainer;
|
|
7
9
|
onChange?: (value: string) => void;
|
|
@@ -20,8 +20,17 @@ export interface ITabsBox {
|
|
|
20
20
|
children?: React.ReactNode;
|
|
21
21
|
tabsWidth?: string;
|
|
22
22
|
isCollapseActive?: boolean;
|
|
23
|
+
isResizing?: any;
|
|
24
|
+
handleMouseDown?: (e: React.MouseEvent) => void;
|
|
23
25
|
}
|
|
24
|
-
export interface ITabsContainer
|
|
26
|
+
export interface ITabsContainer {
|
|
27
|
+
setValue: (value: string) => void;
|
|
28
|
+
value: string;
|
|
29
|
+
tabs: TypeTabsContainer;
|
|
30
|
+
onChange?: (value: string) => void;
|
|
31
|
+
children?: React.ReactNode;
|
|
32
|
+
tabsWidth?: string;
|
|
33
|
+
isCollapseActive?: boolean;
|
|
25
34
|
}
|
|
26
35
|
export interface ITabsContent {
|
|
27
36
|
tabsContent: TypeTabsContent;
|