@unovis/react 1.5.0-alpha.7 → 1.5.0-beta.0

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.
@@ -12,6 +12,7 @@ export declare type VisGraphProps<N extends GraphInputNode, L extends GraphInput
12
12
  };
13
13
  export declare const VisGraphSelectors: {
14
14
  root: string;
15
+ graphGroup: string;
15
16
  background: string;
16
17
  node: string;
17
18
  nodeShape: string;
@@ -7,14 +7,14 @@ function VisBulletLegendFC(props, fRef) {
7
7
  const ref = useRef(null);
8
8
  const [component, setComponent] = useState();
9
9
  useEffect(() => {
10
- const c = new BulletLegend(ref.current, props);
10
+ const c = new BulletLegend(ref.current, Object.assign(Object.assign({}, props), { renderIntoProvidedDomNode: true }));
11
11
  setComponent(c);
12
12
  return () => c === null || c === void 0 ? void 0 : c.destroy();
13
13
  }, []);
14
14
  useEffect(() => {
15
15
  component === null || component === void 0 ? void 0 : component.update(props);
16
16
  });
17
- useImperativeHandle(fRef, () => ({ get component() { return component; } }), []);
17
+ useImperativeHandle(fRef, () => ({ get component() { return component; } }), [component]);
18
18
  return React.createElement("div", { className: props.className, ref: ref });
19
19
  }
20
20
  const VisBulletLegend = React.memo(React.forwardRef(VisBulletLegendFC), arePropsEqual);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/html-components/bullet-legend/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { BulletLegend, BulletLegendConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\nexport type VisBulletLegendRef = {\n component?: BulletLegend;\n}\n\nexport type VisBulletLegendProps = BulletLegendConfigInterface & {\n ref?: Ref<VisBulletLegendRef>;\n className?: string;\n}\n\nexport const VisBulletLegendSelectors = BulletLegend.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisBulletLegendFC (props: VisBulletLegendProps, fRef: ForwardedRef<VisBulletLegendRef>): JSX.Element {\n const ref = useRef<HTMLDivElement>(null)\n const [component, setComponent] = useState<BulletLegend>()\n\n // On Mount\n useEffect(() => {\n const c = new BulletLegend(ref.current as HTMLDivElement, props)\n setComponent(c)\n\n return () => c?.destroy()\n }, [])\n\n // On Props Update\n useEffect(() => {\n component?.update(props)\n })\n\n useImperativeHandle(fRef, () => ({ get component () { return component } }), [])\n return <div className={props.className} ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisBulletLegend: ((props: VisBulletLegendProps) => JSX.Element | null) = React.memo(React.forwardRef(VisBulletLegendFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAgBa,MAAA,wBAAwB,GAAG,YAAY,CAAC,UAAS;AAG9D,SAAS,iBAAiB,CAAE,KAA2B,EAAE,IAAsC,EAAA;AAC7F,IAAA,MAAM,GAAG,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IACxC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,EAAgB,CAAA;IAG1D,SAAS,CAAC,MAAK;QACb,MAAM,CAAC,GAAG,IAAI,YAAY,CAAC,GAAG,CAAC,OAAyB,EAAE,KAAK,CAAC,CAAA;QAChE,YAAY,CAAC,CAAC,CAAC,CAAA;QAEf,OAAO,MAAM,CAAC,KAAA,IAAA,IAAD,CAAC,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAD,CAAC,CAAE,OAAO,EAAE,CAAA;KAC1B,EAAE,EAAE,CAAC,CAAA;IAGN,SAAS,CAAC,MAAK;QACb,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,MAAM,CAAC,KAAK,CAAC,CAAA;AAC1B,KAAC,CAAC,CAAA;IAEF,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,SAAS,KAAM,OAAO,SAAS,CAAA,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;IAChF,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,EAAA,CAAI,CAAA;AACtD,CAAC;AAIY,MAAA,eAAe,GAA0D,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,aAAa;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/html-components/bullet-legend/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { BulletLegend, BulletLegendConfigInterface } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\nexport type VisBulletLegendRef = {\n component?: BulletLegend;\n}\n\nexport type VisBulletLegendProps = BulletLegendConfigInterface & {\n ref?: Ref<VisBulletLegendRef>;\n className?: string;\n}\n\nexport const VisBulletLegendSelectors = BulletLegend.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisBulletLegendFC (props: VisBulletLegendProps, fRef: ForwardedRef<VisBulletLegendRef>): JSX.Element {\n const ref = useRef<HTMLDivElement>(null)\n const [component, setComponent] = useState<BulletLegend>()\n\n // On Mount\n useEffect(() => {\n const c = new BulletLegend(ref.current as HTMLDivElement, { ...props, renderIntoProvidedDomNode: true })\n setComponent(c)\n\n return () => c?.destroy()\n }, [])\n\n // On Props Update\n useEffect(() => {\n component?.update(props)\n })\n\n useImperativeHandle(fRef, () => ({ get component () { return component } }), [component])\n return <div className={props.className} ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisBulletLegend: ((props: VisBulletLegendProps) => JSX.Element | null) = React.memo(React.forwardRef(VisBulletLegendFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAgBa,MAAA,wBAAwB,GAAG,YAAY,CAAC,UAAS;AAG9D,SAAS,iBAAiB,CAAE,KAA2B,EAAE,IAAsC,EAAA;AAC7F,IAAA,MAAM,GAAG,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IACxC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,EAAgB,CAAA;IAG1D,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,CAAC,GAAG,IAAI,YAAY,CAAC,GAAG,CAAC,OAAyB,EAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAO,KAAK,CAAE,EAAA,EAAA,yBAAyB,EAAE,IAAI,IAAG,CAAA;QACxG,YAAY,CAAC,CAAC,CAAC,CAAA;QAEf,OAAO,MAAM,CAAC,KAAA,IAAA,IAAD,CAAC,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAD,CAAC,CAAE,OAAO,EAAE,CAAA;KAC1B,EAAE,EAAE,CAAC,CAAA;IAGN,SAAS,CAAC,MAAK;QACb,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,MAAM,CAAC,KAAK,CAAC,CAAA;AAC1B,KAAC,CAAC,CAAA;IAEF,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,SAAS,GAAA,EAAM,OAAO,SAAS,CAAA,EAAE,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAA;IACzF,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,EAAA,CAAI,CAAA;AACtD,CAAC;AAIY,MAAA,eAAe,GAA0D,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,aAAa;;;;"}
@@ -16,7 +16,7 @@ function VisLeafletFlowMapFC(props, fRef) {
16
16
  component === null || component === void 0 ? void 0 : component.setData(props.data);
17
17
  component === null || component === void 0 ? void 0 : component.setConfig(props);
18
18
  });
19
- useImperativeHandle(fRef, () => ({ get component() { return component; } }), []);
19
+ useImperativeHandle(fRef, () => ({ get component() { return component; } }), [component]);
20
20
  return React.createElement("div", { className: props.className, ref: ref });
21
21
  }
22
22
  const VisLeafletFlowMap = React.memo(React.forwardRef(VisLeafletFlowMapFC), arePropsEqual);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/html-components/leaflet-flow-map/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { LeafletFlowMap, LeafletFlowMapConfigInterface, GenericDataRecord } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\nexport type VisLeafletFlowMapRef<PointDatum extends GenericDataRecord, FlowDatum extends GenericDataRecord> = {\n component?: LeafletFlowMap<PointDatum, FlowDatum>;\n}\n\nexport type VisLeafletFlowMapProps<PointDatum extends GenericDataRecord, FlowDatum extends GenericDataRecord> = LeafletFlowMapConfigInterface<PointDatum, FlowDatum> & {\n data?: { points: PointDatum[]; flows?: FlowDatum[] };\n ref?: Ref<VisLeafletFlowMapRef<PointDatum, FlowDatum>>;\n className?: string;\n}\n\nexport const VisLeafletFlowMapSelectors = LeafletFlowMap.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisLeafletFlowMapFC<PointDatum extends GenericDataRecord, FlowDatum extends GenericDataRecord> (props: VisLeafletFlowMapProps<PointDatum, FlowDatum>, fRef: ForwardedRef<VisLeafletFlowMapRef<PointDatum, FlowDatum>>): JSX.Element {\n const ref = useRef<HTMLDivElement>(null)\n const [component, setComponent] = useState<LeafletFlowMap<PointDatum, FlowDatum>>()\n\n // On Mount\n useEffect(() => {\n const c = new LeafletFlowMap<PointDatum, FlowDatum>(ref.current as HTMLDivElement, props, props.data)\n setComponent(c)\n\n return () => c?.destroy()\n }, [])\n\n // On Props Update\n useEffect(() => {\n if (props.data) component?.setData(props.data)\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ get component () { return component } }), [])\n return <div className={props.className} ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisLeafletFlowMap: (<PointDatum extends GenericDataRecord, FlowDatum extends GenericDataRecord>(props: VisLeafletFlowMapProps<PointDatum, FlowDatum>) => JSX.Element | null) = React.memo(React.forwardRef(VisLeafletFlowMapFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAiBa,MAAA,0BAA0B,GAAG,cAAc,CAAC,UAAS;AAGlE,SAAS,mBAAmB,CAA6E,KAAoD,EAAE,IAA+D,EAAA;AAC5N,IAAA,MAAM,GAAG,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IACxC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,EAAyC,CAAA;IAGnF,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,CAAC,GAAG,IAAI,cAAc,CAAwB,GAAG,CAAC,OAAyB,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;QACrG,YAAY,CAAC,CAAC,CAAC,CAAA;QAEf,OAAO,MAAM,CAAC,KAAA,IAAA,IAAD,CAAC,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAD,CAAC,CAAE,OAAO,EAAE,CAAA;KAC1B,EAAE,EAAE,CAAC,CAAA;IAGN,SAAS,CAAC,MAAK;QACb,IAAI,KAAK,CAAC,IAAI;YAAE,SAAS,KAAA,IAAA,IAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC9C,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,SAAS,CAAC,KAAK,CAAC,CAAA;AAC7B,KAAC,CAAC,CAAA;IAEF,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,SAAS,KAAM,OAAO,SAAS,CAAA,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;IAChF,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,EAAA,CAAI,CAAA;AACtD,CAAC;AAIY,MAAA,iBAAiB,GAA8J,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,aAAa;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/html-components/leaflet-flow-map/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { LeafletFlowMap, LeafletFlowMapConfigInterface, GenericDataRecord } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\nexport type VisLeafletFlowMapRef<PointDatum extends GenericDataRecord, FlowDatum extends GenericDataRecord> = {\n component?: LeafletFlowMap<PointDatum, FlowDatum>;\n}\n\nexport type VisLeafletFlowMapProps<PointDatum extends GenericDataRecord, FlowDatum extends GenericDataRecord> = LeafletFlowMapConfigInterface<PointDatum, FlowDatum> & {\n data?: { points: PointDatum[]; flows?: FlowDatum[] };\n ref?: Ref<VisLeafletFlowMapRef<PointDatum, FlowDatum>>;\n className?: string;\n}\n\nexport const VisLeafletFlowMapSelectors = LeafletFlowMap.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisLeafletFlowMapFC<PointDatum extends GenericDataRecord, FlowDatum extends GenericDataRecord> (props: VisLeafletFlowMapProps<PointDatum, FlowDatum>, fRef: ForwardedRef<VisLeafletFlowMapRef<PointDatum, FlowDatum>>): JSX.Element {\n const ref = useRef<HTMLDivElement>(null)\n const [component, setComponent] = useState<LeafletFlowMap<PointDatum, FlowDatum>>()\n\n // On Mount\n useEffect(() => {\n const c = new LeafletFlowMap<PointDatum, FlowDatum>(ref.current as HTMLDivElement, props, props.data)\n setComponent(c)\n\n return () => c?.destroy()\n }, [])\n\n // On Props Update\n useEffect(() => {\n if (props.data) component?.setData(props.data)\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ get component () { return component } }), [component])\n return <div className={props.className} ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisLeafletFlowMap: (<PointDatum extends GenericDataRecord, FlowDatum extends GenericDataRecord>(props: VisLeafletFlowMapProps<PointDatum, FlowDatum>) => JSX.Element | null) = React.memo(React.forwardRef(VisLeafletFlowMapFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAiBa,MAAA,0BAA0B,GAAG,cAAc,CAAC,UAAS;AAGlE,SAAS,mBAAmB,CAA6E,KAAoD,EAAE,IAA+D,EAAA;AAC5N,IAAA,MAAM,GAAG,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IACxC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,EAAyC,CAAA;IAGnF,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,CAAC,GAAG,IAAI,cAAc,CAAwB,GAAG,CAAC,OAAyB,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;QACrG,YAAY,CAAC,CAAC,CAAC,CAAA;QAEf,OAAO,MAAM,CAAC,KAAA,IAAA,IAAD,CAAC,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAD,CAAC,CAAE,OAAO,EAAE,CAAA;KAC1B,EAAE,EAAE,CAAC,CAAA;IAGN,SAAS,CAAC,MAAK;QACb,IAAI,KAAK,CAAC,IAAI;YAAE,SAAS,KAAA,IAAA,IAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC9C,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,SAAS,CAAC,KAAK,CAAC,CAAA;AAC7B,KAAC,CAAC,CAAA;IAEF,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,SAAS,GAAA,EAAM,OAAO,SAAS,CAAA,EAAE,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAA;IACzF,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,EAAA,CAAI,CAAA;AACtD,CAAC;AAIY,MAAA,iBAAiB,GAA8J,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,aAAa;;;;"}
@@ -16,7 +16,7 @@ function VisLeafletMapFC(props, fRef) {
16
16
  component === null || component === void 0 ? void 0 : component.setData(props.data);
17
17
  component === null || component === void 0 ? void 0 : component.setConfig(props);
18
18
  });
19
- useImperativeHandle(fRef, () => ({ get component() { return component; } }), []);
19
+ useImperativeHandle(fRef, () => ({ get component() { return component; } }), [component]);
20
20
  return React.createElement("div", { className: props.className, ref: ref });
21
21
  }
22
22
  const VisLeafletMap = React.memo(React.forwardRef(VisLeafletMapFC), arePropsEqual);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/html-components/leaflet-map/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { LeafletMap, LeafletMapConfigInterface, GenericDataRecord } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\nexport type VisLeafletMapRef<Datum extends GenericDataRecord> = {\n component?: LeafletMap<Datum>;\n}\n\nexport type VisLeafletMapProps<Datum extends GenericDataRecord> = LeafletMapConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisLeafletMapRef<Datum>>;\n className?: string;\n}\n\nexport const VisLeafletMapSelectors = LeafletMap.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisLeafletMapFC<Datum extends GenericDataRecord> (props: VisLeafletMapProps<Datum>, fRef: ForwardedRef<VisLeafletMapRef<Datum>>): JSX.Element {\n const ref = useRef<HTMLDivElement>(null)\n const [component, setComponent] = useState<LeafletMap<Datum>>()\n\n // On Mount\n useEffect(() => {\n const c = new LeafletMap<Datum>(ref.current as HTMLDivElement, props, props.data)\n setComponent(c)\n\n return () => c?.destroy()\n }, [])\n\n // On Props Update\n useEffect(() => {\n if (props.data) component?.setData(props.data)\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ get component () { return component } }), [])\n return <div className={props.className} ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisLeafletMap: (<Datum extends GenericDataRecord>(props: VisLeafletMapProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisLeafletMapFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAiBa,MAAA,sBAAsB,GAAG,UAAU,CAAC,UAAS;AAG1D,SAAS,eAAe,CAAmC,KAAgC,EAAE,IAA2C,EAAA;AACtI,IAAA,MAAM,GAAG,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IACxC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,EAAqB,CAAA;IAG/D,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,CAAC,GAAG,IAAI,UAAU,CAAQ,GAAG,CAAC,OAAyB,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;QACjF,YAAY,CAAC,CAAC,CAAC,CAAA;QAEf,OAAO,MAAM,CAAC,KAAA,IAAA,IAAD,CAAC,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAD,CAAC,CAAE,OAAO,EAAE,CAAA;KAC1B,EAAE,EAAE,CAAC,CAAA;IAGN,SAAS,CAAC,MAAK;QACb,IAAI,KAAK,CAAC,IAAI;YAAE,SAAS,KAAA,IAAA,IAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC9C,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,SAAS,CAAC,KAAK,CAAC,CAAA;AAC7B,KAAC,CAAC,CAAA;IAEF,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,SAAS,KAAM,OAAO,SAAS,CAAA,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;IAChF,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,EAAA,CAAI,CAAA;AACtD,CAAC;AAIY,MAAA,aAAa,GAAgG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,aAAa;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/html-components/leaflet-map/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport React, { ForwardedRef, Ref, useImperativeHandle, useEffect, useRef, useState } from 'react'\nimport { LeafletMap, LeafletMapConfigInterface, GenericDataRecord } from '@unovis/ts'\n\n// Utils\nimport { arePropsEqual } from 'src/utils/react'\n\nexport type VisLeafletMapRef<Datum extends GenericDataRecord> = {\n component?: LeafletMap<Datum>;\n}\n\nexport type VisLeafletMapProps<Datum extends GenericDataRecord> = LeafletMapConfigInterface<Datum> & {\n data?: Datum[];\n ref?: Ref<VisLeafletMapRef<Datum>>;\n className?: string;\n}\n\nexport const VisLeafletMapSelectors = LeafletMap.selectors\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction VisLeafletMapFC<Datum extends GenericDataRecord> (props: VisLeafletMapProps<Datum>, fRef: ForwardedRef<VisLeafletMapRef<Datum>>): JSX.Element {\n const ref = useRef<HTMLDivElement>(null)\n const [component, setComponent] = useState<LeafletMap<Datum>>()\n\n // On Mount\n useEffect(() => {\n const c = new LeafletMap<Datum>(ref.current as HTMLDivElement, props, props.data)\n setComponent(c)\n\n return () => c?.destroy()\n }, [])\n\n // On Props Update\n useEffect(() => {\n if (props.data) component?.setData(props.data)\n component?.setConfig(props)\n })\n\n useImperativeHandle(fRef, () => ({ get component () { return component } }), [component])\n return <div className={props.className} ref={ref} />\n}\n\n// We export a memoized component to avoid unnecessary re-renders\n// and define its type explicitly to help react-docgen-typescript to extract information about props\nexport const VisLeafletMap: (<Datum extends GenericDataRecord>(props: VisLeafletMapProps<Datum>) => JSX.Element | null) = React.memo(React.forwardRef(VisLeafletMapFC), arePropsEqual)\n"],"names":[],"mappings":";;;;AAiBa,MAAA,sBAAsB,GAAG,UAAU,CAAC,UAAS;AAG1D,SAAS,eAAe,CAAmC,KAAgC,EAAE,IAA2C,EAAA;AACtI,IAAA,MAAM,GAAG,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IACxC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,EAAqB,CAAA;IAG/D,SAAS,CAAC,MAAK;AACb,QAAA,MAAM,CAAC,GAAG,IAAI,UAAU,CAAQ,GAAG,CAAC,OAAyB,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;QACjF,YAAY,CAAC,CAAC,CAAC,CAAA;QAEf,OAAO,MAAM,CAAC,KAAA,IAAA,IAAD,CAAC,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAD,CAAC,CAAE,OAAO,EAAE,CAAA;KAC1B,EAAE,EAAE,CAAC,CAAA;IAGN,SAAS,CAAC,MAAK;QACb,IAAI,KAAK,CAAC,IAAI;YAAE,SAAS,KAAA,IAAA,IAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC9C,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,SAAS,CAAC,KAAK,CAAC,CAAA;AAC7B,KAAC,CAAC,CAAA;IAEF,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,SAAS,GAAA,EAAM,OAAO,SAAS,CAAA,EAAE,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAA;IACzF,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,EAAA,CAAI,CAAA;AACtD,CAAC;AAIY,MAAA,aAAa,GAAgG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,aAAa;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unovis/react",
3
3
  "description": "Modular data visualization framework for React, Angular, Svelte, and vanilla TypeScript or JavaScript",
4
- "version": "1.5.0-alpha.7",
4
+ "version": "1.5.0-beta.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/f5/unovis.git",
@@ -35,7 +35,7 @@
35
35
  "publish:dist": "rm -rf dist/.cache; cp ./{LICENSE,README.md,package.json} ./dist; cd ./dist; npm publish"
36
36
  },
37
37
  "peerDependencies": {
38
- "@unovis/ts": "1.5.0-alpha.7",
38
+ "@unovis/ts": "1.5.0-beta.0",
39
39
  "react": ">=16.8.0 || ^17 || ^18",
40
40
  "react-dom": ">=16.8.0 || ^17 || ^18"
41
41
  },