@conboai/storybook.components 0.5.10 → 0.5.11

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,8 +1,25 @@
1
1
  import { MetromapPalleteData } from './MetroMapUtils';
2
2
  import { default as React } from 'react';
3
3
 
4
+ export type MetroMapElementType = {
5
+ tag: string;
6
+ children: MetroMapElementType[];
7
+ attributes: {
8
+ [key: string]: string;
9
+ };
10
+ text?: string;
11
+ fill?: string;
12
+ stroke?: string;
13
+ key?: string | number;
14
+ style?: {
15
+ pointerEvents?: string;
16
+ display?: string;
17
+ textAnchor?: string;
18
+ };
19
+ className?: string;
20
+ };
4
21
  interface IMetroMap {
5
- elements: IElement;
22
+ elements: MetroMapElementType | null;
6
23
  selectedCluster?: string | string[];
7
24
  minor?: string[];
8
25
  major?: string[];
@@ -20,26 +37,6 @@ interface IMetroMap {
20
37
  timing?: MetromapPalleteData[];
21
38
  disabledSectors?: string[];
22
39
  }
23
- interface IElement {
24
- tag: string;
25
- id: string;
26
- text?: string;
27
- attributes: {
28
- [key: string]: string;
29
- };
30
- onClick?: () => void;
31
- onMouseEnter?: () => void;
32
- fill?: string;
33
- stroke?: string;
34
- key?: string | number;
35
- style?: {
36
- pointerEvents?: string;
37
- display?: string;
38
- textAnchor?: string;
39
- };
40
- children: IElement[];
41
- className?: string;
42
- }
43
40
  declare function MetroMap({ elements, onSelect, selectedCluster, minor, major, isMultiSelect, onHover, svgAttributes, showFullNames, isMap, pollutions, timing, disabledSectors }: IMetroMap): React.JSX.Element | null;
44
41
  declare const _default: React.MemoExoticComponent<typeof MetroMap>;
45
42
  export default _default;
@@ -67209,7 +67209,7 @@ const d4 = {
67209
67209
  return o && i;
67210
67210
  }, jce = "yellow", $ce = "orange";
67211
67211
  function Vce({
67212
- elements: e,
67212
+ elements: e = null,
67213
67213
  onSelect: t,
67214
67214
  selectedCluster: n,
67215
67215
  minor: r,
@@ -67223,7 +67223,8 @@ function Vce({
67223
67223
  timing: h,
67224
67224
  disabledSectors: f
67225
67225
  }) {
67226
- if (!e) return null;
67226
+ if (!e)
67227
+ return null;
67227
67228
  const b = (x, T) => {
67228
67229
  if (!x) return T;
67229
67230
  if (x && x.includes("_fill")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conboai/storybook.components",
3
- "version": "0.5.10",
3
+ "version": "0.5.11",
4
4
  "main": "dist/storybook.components.mjs",
5
5
  "types": "dist/build/index.d.ts",
6
6
  "files": [