@conboai/storybook.components 0.4.95 → 0.4.97

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,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { GeoComponentProps } from './types';
3
3
 
4
- declare const Geo: ({ mode: modeFromProps, resetKey: resetKeyFromProps, onChange: onChangeFromProps, onComplete, data, selectedGeoId: selectedGeoIdFromProps, onSelect, onMouseMove, onDragEnd, showDirection, showNumbers, allowDelete, allowAdd, disableControls, fitZoom, mapCentering, showOnlyPoints, initialCenter, center: centerFromProps, zoom: zoomFromProps, }: GeoComponentProps) => React.JSX.Element;
4
+ declare const Geo: (props: GeoComponentProps) => React.JSX.Element;
5
5
  export default Geo;
@@ -37,12 +37,12 @@ export interface GeoComponentProps {
37
37
  mode?: GeoMode;
38
38
  showDirection?: boolean;
39
39
  resetKey?: number;
40
- data?: GeoType[] | null;
40
+ data?: GeoType[];
41
41
  onMouseMove?: (coordinatePoint: CoordinatePoint) => void;
42
42
  showNumbers?: boolean;
43
43
  allowDelete?: boolean;
44
44
  allowAdd?: boolean;
45
- selectedGeoId?: string | null;
45
+ selectedGeoId?: string;
46
46
  zoom?: number;
47
47
  fitZoom?: boolean;
48
48
  mapCentering?: boolean;
@@ -15,7 +15,7 @@ export interface ImagePlayerProps {
15
15
  sx?: SxProps;
16
16
  shapes: Shape[];
17
17
  selectedShape?: Shape;
18
- onShapeSelect?: (selectedShape: Shape | null, shapesList: Shape[]) => void;
18
+ onShapeSelect?: <T extends Shape>(selectedShape: T | null, shapesList: T[]) => void;
19
19
  shapeStyles?: any;
20
20
  clearFrameDetails?: () => void;
21
21
  fetchFrameDetails?: (snapshot: Snapshot) => void;
@@ -1,9 +1,9 @@
1
1
  import { default as React } from 'react';
2
2
  import { SxProps } from '@mui/material';
3
- import { CoordinatePoint, GeoMode } from '../Geo/types';
3
+ import { CoordinatePoint, GeoMode, GeoType } from '../Geo/types';
4
4
 
5
5
  export interface IMapPlayerProps {
6
- data: any[];
6
+ data?: GeoType[];
7
7
  onChange?: (point: any) => void;
8
8
  disabled?: boolean;
9
9
  sx?: SxProps;
@@ -17,7 +17,7 @@ export interface IMapPlayerProps {
17
17
  initialCurrentIndex?: number;
18
18
  onCurrentIndexChange?: (newIndex: number) => void;
19
19
  timezone?: string;
20
- center?: CoordinatePoint;
20
+ center?: CoordinatePoint | null;
21
21
  mapHeight?: string;
22
22
  startDate?: string;
23
23
  endDate?: string;
@@ -2,7 +2,7 @@ import { default as React, ReactNode } from 'react';
2
2
 
3
3
  interface IPlayerPanel {
4
4
  disabled?: boolean;
5
- data: any[];
5
+ data: unknown[];
6
6
  startTime?: string;
7
7
  currentTime?: string;
8
8
  endTime?: string;
@@ -10,15 +10,15 @@ interface IPlayerPanel {
10
10
  isPlayingForward?: boolean;
11
11
  isPlayingBackward?: boolean;
12
12
  currentIndex?: number;
13
- onSliderChange: (event: any, newValue: any) => void;
14
- onSliderChangeCommitted: (event: any, newValue: any) => void;
15
- onValueLabelFormat: string | ((value: number, index: number) => ReactNode) | undefined;
16
- onStep: (value: number) => void;
17
- onPlayingBackwardClick: () => void;
18
- onPlayingForwardClick: () => void;
19
- onSetStepForAutoPlay: (value: number) => void;
13
+ onSliderChange?: (event: any, newValue: any) => void;
14
+ onSliderChangeCommitted?: (event: any, newValue: any) => void;
15
+ onValueLabelFormat?: string | ((value: number, index: number) => ReactNode);
16
+ onStep?: (value: number) => void;
17
+ onPlayingBackwardClick?: () => void;
18
+ onPlayingForwardClick?: () => void;
19
+ onSetStepForAutoPlay?: (value: number) => void;
20
20
  stepForAutoPlay: number;
21
21
  maxSliderValue?: number;
22
22
  }
23
- declare const PlayerPanel: ({ disabled, data, startTime, currentTime, endTime, delay, isPlayingBackward, isPlayingForward, currentIndex, onSliderChange, onSliderChangeCommitted, onValueLabelFormat, onStep, onPlayingBackwardClick, onPlayingForwardClick, onSetStepForAutoPlay, stepForAutoPlay, maxSliderValue, }: IPlayerPanel) => React.JSX.Element;
23
+ declare const PlayerPanel: ({ disabled, startTime, currentTime, endTime, delay, data, isPlayingBackward, isPlayingForward, currentIndex, onSliderChange, onSliderChangeCommitted, onValueLabelFormat, onStep, onPlayingBackwardClick, onPlayingForwardClick, onSetStepForAutoPlay, stepForAutoPlay, maxSliderValue, }: IPlayerPanel) => React.JSX.Element;
24
24
  export default PlayerPanel;
@@ -39,8 +39,8 @@ export interface IShapesProps {
39
39
  delete: boolean;
40
40
  };
41
41
  };
42
- onShapeChange?: (updatedShape: Shape | null, updatedShapesList: Shape[]) => void;
43
- onShapeSelect?: (selectedShape: Shape | null, shapesList: Shape[]) => void;
42
+ onShapeChange?: <T extends Shape>(updatedShape: T | null, updatedShapesList: T[]) => void;
43
+ onShapeSelect?: <T extends Shape>(selectedShape: T | null, shapesList: T[]) => void;
44
44
  onMouseMove?: (mousePoint: Point) => void;
45
45
  showDirection?: boolean;
46
46
  showNumbers?: boolean;