@conboai/storybook.components 0.4.23 → 0.4.25
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,3 +1,4 @@
|
|
|
1
|
+
import { Pollution } from './MetroMapUtils';
|
|
1
2
|
import { default as React } from 'react';
|
|
2
3
|
|
|
3
4
|
interface IMetroMap {
|
|
@@ -14,6 +15,8 @@ interface IMetroMap {
|
|
|
14
15
|
[key: string]: string;
|
|
15
16
|
};
|
|
16
17
|
showFullNames?: boolean;
|
|
18
|
+
isMap?: boolean;
|
|
19
|
+
pollutions?: Pollution[];
|
|
17
20
|
}
|
|
18
21
|
interface IElement {
|
|
19
22
|
tag: string;
|
|
@@ -25,6 +28,7 @@ interface IElement {
|
|
|
25
28
|
onClick?: () => void;
|
|
26
29
|
onMouseEnter?: () => void;
|
|
27
30
|
fill?: string;
|
|
31
|
+
stroke?: string;
|
|
28
32
|
key?: string | number;
|
|
29
33
|
style?: {
|
|
30
34
|
pointerEvents?: string;
|
|
@@ -34,6 +38,6 @@ interface IElement {
|
|
|
34
38
|
children: IElement[];
|
|
35
39
|
className?: string;
|
|
36
40
|
}
|
|
37
|
-
declare function MetroMap({ elements, onSelect, selectedCluster, minor, major, isMultiSelect, onHover, svgAttributes, showFullNames }: 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;
|
|
38
42
|
declare const _default: React.MemoExoticComponent<typeof MetroMap>;
|
|
39
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,18 @@ 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
|
+
};
|
|
23
|
+
export declare enum PollutionBgColors {
|
|
24
|
+
red = "#EB5757",
|
|
25
|
+
yellow = "#FFD301",
|
|
26
|
+
green = "#63B759"
|
|
27
|
+
}
|
|
28
|
+
declare const handlePollutionFill: (id: string, color: PollutionColors) => string | null;
|
|
29
|
+
declare const findPollutionByIdPrefix: (id: string, pollutions: Pollution[]) => Pollution | undefined;
|
|
30
|
+
export { parseSvg, extractPrefix, extractZip, getParsedSvgViewsFromZip, startsWithAny, isIdSelected, pollutionPreffixes, hasPollutionPrefix, findPollutionByIdPrefix, handlePollutionFill };
|