@ambuj.bhaskar/react-component-library 0.20.2-alpha → 0.20.3-alpha
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.
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +74 -76
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -962,6 +962,8 @@ export declare type MapViewProps = {
|
|
|
962
962
|
navClassName?: string;
|
|
963
963
|
navButtonColor?: Color;
|
|
964
964
|
className?: string;
|
|
965
|
+
focusedIndex?: number;
|
|
966
|
+
onFocusedIndexChange?: (index: number) => void;
|
|
965
967
|
};
|
|
966
968
|
|
|
967
969
|
export declare const MathAnnotationHelper: {
|
package/dist/index.js
CHANGED
|
@@ -81749,8 +81749,22 @@ const EOe = /* @__PURE__ */ Ve(_Oe), SOe = bOe(function({ position: t, ...n }, r
|
|
|
81749
81749
|
defaultZoom: BOe,
|
|
81750
81750
|
defaultCenter: LOe,
|
|
81751
81751
|
defaultMapProvider: IOe.osm
|
|
81752
|
-
}, ROe =
|
|
81753
|
-
|
|
81752
|
+
}, ROe = ({ items: e }) => {
|
|
81753
|
+
const t = tP();
|
|
81754
|
+
return $t(() => {
|
|
81755
|
+
if (!(e != null && e.length)) return;
|
|
81756
|
+
const n = zc.latLngBounds(e == null ? void 0 : e.map((r) => r == null ? void 0 : r.position));
|
|
81757
|
+
t.fitBounds(n, { padding: [50, 50] });
|
|
81758
|
+
}, [e, t]), null;
|
|
81759
|
+
}, POe = ({
|
|
81760
|
+
mapRef: e
|
|
81761
|
+
}) => {
|
|
81762
|
+
const t = tP();
|
|
81763
|
+
return $t(() => {
|
|
81764
|
+
e.current = t;
|
|
81765
|
+
}, [t]), null;
|
|
81766
|
+
}, DOe = "../../src/assets/images/map_pin.svg", NOe = new zc.Icon({
|
|
81767
|
+
iconUrl: DOe,
|
|
81754
81768
|
iconSize: new zc.Point(32, 32),
|
|
81755
81769
|
iconAnchor: new zc.Point(16, 32),
|
|
81756
81770
|
className: "leaflet-div-icon",
|
|
@@ -81759,27 +81773,13 @@ const EOe = /* @__PURE__ */ Ve(_Oe), SOe = bOe(function({ position: t, ...n }, r
|
|
|
81759
81773
|
SOe,
|
|
81760
81774
|
{
|
|
81761
81775
|
position: e,
|
|
81762
|
-
icon:
|
|
81776
|
+
icon: NOe,
|
|
81763
81777
|
draggable: !1,
|
|
81764
81778
|
ref: r,
|
|
81765
81779
|
...n,
|
|
81766
81780
|
children: t
|
|
81767
81781
|
}
|
|
81768
|
-
)),
|
|
81769
|
-
const t = tP();
|
|
81770
|
-
return $t(() => {
|
|
81771
|
-
if (!(e != null && e.length)) return;
|
|
81772
|
-
const n = zc.latLngBounds(e == null ? void 0 : e.map((r) => r == null ? void 0 : r.position));
|
|
81773
|
-
t.fitBounds(n, { padding: [50, 50] });
|
|
81774
|
-
}, [e, t]), null;
|
|
81775
|
-
}, NOe = ({
|
|
81776
|
-
mapRef: e
|
|
81777
|
-
}) => {
|
|
81778
|
-
const t = tP();
|
|
81779
|
-
return $t(() => {
|
|
81780
|
-
e.current = t;
|
|
81781
|
-
}, [t]), null;
|
|
81782
|
-
}, fLe = ({
|
|
81782
|
+
)), fLe = ({
|
|
81783
81783
|
items: e,
|
|
81784
81784
|
width: t = "500px",
|
|
81785
81785
|
height: n = "500px",
|
|
@@ -81787,35 +81787,39 @@ const EOe = /* @__PURE__ */ Ve(_Oe), SOe = bOe(function({ position: t, ...n }, r
|
|
|
81787
81787
|
showNavigation: o = !0,
|
|
81788
81788
|
navClassName: i,
|
|
81789
81789
|
navButtonColor: a,
|
|
81790
|
-
className: s
|
|
81790
|
+
className: s,
|
|
81791
|
+
focusedIndex: l,
|
|
81792
|
+
onFocusedIndexChange: u
|
|
81791
81793
|
}) => {
|
|
81792
|
-
const [
|
|
81794
|
+
const [d, h] = Ut(!1), [C, m] = Ut(0), A = typeof l == "number", b = A ? l : C;
|
|
81793
81795
|
$t(() => {
|
|
81794
|
-
|
|
81796
|
+
h(!0);
|
|
81795
81797
|
}, []);
|
|
81796
|
-
const
|
|
81797
|
-
|
|
81798
|
-
|
|
81799
|
-
|
|
81800
|
-
|
|
81801
|
-
|
|
81802
|
-
|
|
81803
|
-
|
|
81798
|
+
const p = () => {
|
|
81799
|
+
const M = (b - 1 + e.length) % e.length;
|
|
81800
|
+
A && u ? u(M) : m(M);
|
|
81801
|
+
}, _ = () => {
|
|
81802
|
+
const M = (b + 1) % e.length;
|
|
81803
|
+
A && u ? u(M) : m(M);
|
|
81804
|
+
}, w = s1(
|
|
81805
|
+
() => e == null ? void 0 : e[b],
|
|
81806
|
+
[e, b]
|
|
81807
|
+
), x = St(null);
|
|
81804
81808
|
$t(() => {
|
|
81805
|
-
if (!
|
|
81806
|
-
const
|
|
81807
|
-
var
|
|
81808
|
-
(
|
|
81809
|
+
if (!d) return;
|
|
81810
|
+
const M = requestAnimationFrame(() => {
|
|
81811
|
+
var H;
|
|
81812
|
+
(H = x == null ? void 0 : x.current) == null || H.openPopup();
|
|
81809
81813
|
});
|
|
81810
|
-
return () => cancelAnimationFrame(
|
|
81811
|
-
}, [
|
|
81812
|
-
const
|
|
81814
|
+
return () => cancelAnimationFrame(M);
|
|
81815
|
+
}, [b, d]);
|
|
81816
|
+
const E = a || "var(--awi-color-common-highlight, #ffcc00)", S = St(null);
|
|
81813
81817
|
return $t(() => {
|
|
81814
|
-
const
|
|
81815
|
-
|
|
81818
|
+
const M = S.current;
|
|
81819
|
+
M && (w != null && w.position) && M.setView(w.position, M.getZoom(), {
|
|
81816
81820
|
animate: !0
|
|
81817
81821
|
});
|
|
81818
|
-
}, [
|
|
81822
|
+
}, [w, d]), typeof window > "u" || !d || !(e != null && e.length) ? null : /* @__PURE__ */ Q.jsxs(
|
|
81819
81823
|
"div",
|
|
81820
81824
|
{
|
|
81821
81825
|
className: `map_view_container ${s}`,
|
|
@@ -81824,7 +81828,7 @@ const EOe = /* @__PURE__ */ Ve(_Oe), SOe = bOe(function({ position: t, ...n }, r
|
|
|
81824
81828
|
/* @__PURE__ */ Q.jsxs(
|
|
81825
81829
|
EOe,
|
|
81826
81830
|
{
|
|
81827
|
-
center:
|
|
81831
|
+
center: w == null ? void 0 : w.position,
|
|
81828
81832
|
zoom: yf.defaultZoom,
|
|
81829
81833
|
className: "static_map",
|
|
81830
81834
|
zoomControl: !1,
|
|
@@ -81837,48 +81841,42 @@ const EOe = /* @__PURE__ */ Ve(_Oe), SOe = bOe(function({ position: t, ...n }, r
|
|
|
81837
81841
|
attribution: yf.defaultMapProvider.attribution
|
|
81838
81842
|
}
|
|
81839
81843
|
),
|
|
81840
|
-
/* @__PURE__ */ Q.jsx(
|
|
81841
|
-
/* @__PURE__ */ Q.jsx(
|
|
81844
|
+
/* @__PURE__ */ Q.jsx(POe, { mapRef: S }),
|
|
81845
|
+
/* @__PURE__ */ Q.jsx(ROe, { items: e }),
|
|
81842
81846
|
/* @__PURE__ */ Q.jsx(OOe, { position: "bottomright" }),
|
|
81843
81847
|
e == null ? void 0 : e.map(
|
|
81844
|
-
(
|
|
81848
|
+
(M, H) => H === b ? /* @__PURE__ */ Q.jsx(G_, { position: M == null ? void 0 : M.position, ref: x, children: r ? /* @__PURE__ */ Q.jsx(MOe, { closeButton: !1, autoPan: !1, children: M == null ? void 0 : M.element }) : null }, H) : /* @__PURE__ */ Q.jsx(G_, { position: M == null ? void 0 : M.position }, H)
|
|
81845
81849
|
)
|
|
81846
81850
|
]
|
|
81847
81851
|
}
|
|
81848
81852
|
),
|
|
81849
|
-
o ? /* @__PURE__ */ Q.jsxs(
|
|
81850
|
-
|
|
81851
|
-
|
|
81852
|
-
|
|
81853
|
-
|
|
81854
|
-
|
|
81855
|
-
|
|
81856
|
-
|
|
81857
|
-
|
|
81858
|
-
|
|
81859
|
-
|
|
81860
|
-
|
|
81861
|
-
|
|
81862
|
-
|
|
81863
|
-
|
|
81864
|
-
|
|
81865
|
-
|
|
81866
|
-
|
|
81867
|
-
|
|
81868
|
-
|
|
81869
|
-
|
|
81870
|
-
|
|
81871
|
-
|
|
81872
|
-
|
|
81873
|
-
|
|
81874
|
-
|
|
81875
|
-
|
|
81876
|
-
title: "Next"
|
|
81877
|
-
}
|
|
81878
|
-
)
|
|
81879
|
-
]
|
|
81880
|
-
}
|
|
81881
|
-
) : /* @__PURE__ */ Q.jsx(Q.Fragment, {})
|
|
81853
|
+
o ? /* @__PURE__ */ Q.jsxs("div", { className: `map_view_nav_container ${i ?? ""}`, children: [
|
|
81854
|
+
/* @__PURE__ */ Q.jsx(
|
|
81855
|
+
Mi,
|
|
81856
|
+
{
|
|
81857
|
+
variant: "primary",
|
|
81858
|
+
onClick: p,
|
|
81859
|
+
size: "s",
|
|
81860
|
+
icon: "leftArrow",
|
|
81861
|
+
backgroundColor: E,
|
|
81862
|
+
borderColor: E,
|
|
81863
|
+
title: "Previous"
|
|
81864
|
+
}
|
|
81865
|
+
),
|
|
81866
|
+
/* @__PURE__ */ Q.jsx(
|
|
81867
|
+
Mi,
|
|
81868
|
+
{
|
|
81869
|
+
variant: "primary",
|
|
81870
|
+
onClick: _,
|
|
81871
|
+
size: "s",
|
|
81872
|
+
icon: "rightArrow",
|
|
81873
|
+
iconPosition: "after",
|
|
81874
|
+
backgroundColor: E,
|
|
81875
|
+
borderColor: E,
|
|
81876
|
+
title: "Next"
|
|
81877
|
+
}
|
|
81878
|
+
)
|
|
81879
|
+
] }) : null
|
|
81882
81880
|
]
|
|
81883
81881
|
}
|
|
81884
81882
|
);
|