@conboai/storybook.components 0.4.33 → 0.4.35

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,25 +1,15 @@
1
1
  import { default as React } from 'react';
2
2
  import { SxProps } from '@mui/material';
3
+ import { GeoType } from '../Geo/types';
3
4
 
4
5
  export interface MapPlayerProps {
5
6
  data: any[];
6
- initialCenter: {
7
- lat: number;
8
- lng: number;
9
- };
10
- onChange?: (data: {
11
- id: string;
12
- type: string;
13
- time: string;
14
- coordinates: {
15
- lng: number;
16
- lat: number;
17
- }[];
18
- }) => void;
7
+ onChange?: (value: string) => void;
19
8
  onInitialLoad?: (data: {
20
9
  id: string;
21
10
  type: string;
22
- time: string;
11
+ startTime: string;
12
+ endTime: string;
23
13
  coordinates: {
24
14
  lng: number;
25
15
  lat: number;
@@ -29,19 +19,14 @@ export interface MapPlayerProps {
29
19
  disabled?: boolean;
30
20
  sx?: SxProps;
31
21
  clearFrameDetails?: () => void;
32
- fetchFrameDetails?: (data: {
33
- id: string;
34
- type: string;
35
- time: string;
36
- coordinates: {
37
- lng: number;
38
- lat: number;
39
- }[];
40
- }) => void;
22
+ fetchFrameDetails?: (value: string) => void;
41
23
  delay?: string;
42
24
  onClear?: () => void;
43
25
  previewImageSize?: string;
44
26
  mapHeight?: string;
27
+ getCurrentTime?: (value: string) => void;
28
+ onSelectPoint?: (geo: GeoType) => void;
29
+ selectedGeoId?: string | null;
45
30
  }
46
31
  declare const MapPlayer: React.FC<MapPlayerProps>;
47
32
  export default MapPlayer;
@@ -1,4 +1,4 @@
1
- import { Pollution } from './MetroMapUtils';
1
+ import { MetromapPalleteData } from './MetroMapUtils';
2
2
  import { default as React } from 'react';
3
3
 
4
4
  interface IMetroMap {
@@ -16,7 +16,8 @@ interface IMetroMap {
16
16
  };
17
17
  showFullNames?: boolean;
18
18
  isMap?: boolean;
19
- pollutions?: Pollution[];
19
+ pollutions?: MetromapPalleteData[];
20
+ timing?: MetromapPalleteData[];
20
21
  }
21
22
  interface IElement {
22
23
  tag: string;
@@ -38,6 +39,6 @@ interface IElement {
38
39
  children: IElement[];
39
40
  className?: string;
40
41
  }
41
- declare function MetroMap({ elements, onSelect, selectedCluster, minor, major, isMultiSelect, onHover, svgAttributes, showFullNames, isMap, pollutions }: IMetroMap): React.JSX.Element | null;
42
+ declare function MetroMap({ elements, onSelect, selectedCluster, minor, major, isMultiSelect, onHover, svgAttributes, showFullNames, isMap, pollutions, timing }: IMetroMap): React.JSX.Element | null;
42
43
  declare const _default: React.MemoExoticComponent<typeof MetroMap>;
43
44
  export default _default;
@@ -14,18 +14,24 @@ declare const extractZip: (file: File) => Promise<zipResponse[]>;
14
14
  declare function extractPrefix(inputString: string, prefix: string): string;
15
15
  declare const parseSvg: (svg: string) => Promise<any>;
16
16
  declare const pollutionPreffixes: string[];
17
- declare const hasPollutionPrefix: (id: string) => boolean;
18
- export type PollutionColors = "red" | "green" | "yellow";
19
- export type Pollution = {
17
+ declare const hasPollutionPreffix: (id: string) => boolean;
18
+ declare const hasTimingPreffix: (id: string) => boolean;
19
+ export type ColorPallete = "red" | "green" | "yellow";
20
+ export type MetromapPalleteData = {
20
21
  id: string;
21
- value: PollutionColors;
22
+ value: ColorPallete;
22
23
  text: string;
23
24
  };
24
- export declare enum PollutionBgColors {
25
+ export declare enum ColorPalleteHex {
25
26
  red = "#EB5757",
26
27
  yellow = "#FFD301",
27
28
  green = "#63B759"
28
29
  }
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 };
30
+ type ColorHandler = {
31
+ [key: string]: (color: ColorPallete) => string;
32
+ };
33
+ export declare const pollutionColorHandler: ColorHandler;
34
+ export declare const timingColorHandler: ColorHandler;
35
+ declare const handlePalleteFill: (id: string, color: ColorPallete, colorHandler: ColorHandler) => string | null;
36
+ declare const findPalleteDataById: (id: string, paletteData: MetromapPalleteData[]) => MetromapPalleteData | undefined;
37
+ export { parseSvg, extractPrefix, extractZip, getParsedSvgViewsFromZip, startsWithAny, isIdSelected, pollutionPreffixes, hasPollutionPreffix, hasTimingPreffix, findPalleteDataById, handlePalleteFill };