@rubin-epo/epo-widget-lib 1.0.0-beta.2 → 1.0.1
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/CameraFilter.cjs +1 -1
- package/dist/CameraFilter.js +9 -9
- package/dist/ColorTool.cjs +1 -1
- package/dist/ColorTool.js +13 -12
- package/dist/FilterTool.cjs +1 -1
- package/dist/FilterTool.js +1 -1
- package/dist/IsochronePlot.cjs +1 -1
- package/dist/IsochronePlot.js +1 -0
- package/dist/SupernovaThreeVector.cjs +1 -1
- package/dist/SupernovaThreeVector.js +4 -4
- package/dist/charts/Base/styles.d.ts +1 -1
- package/dist/charts/ScatterPlot/index.cjs +1 -1
- package/dist/charts/ScatterPlot/index.js +41 -42
- package/dist/charts/styles.d.ts +6 -6
- package/dist/layout/AspectRatio/index.cjs +1 -1
- package/dist/layout/AspectRatio/index.d.ts +2 -4
- package/dist/layout/AspectRatio/index.js +18 -18
- package/dist/layout/AspectRatio/styles.cjs +8 -13
- package/dist/layout/AspectRatio/styles.d.ts +0 -5
- package/dist/layout/AspectRatio/styles.js +10 -18
- package/dist/layout/Controls/index.cjs +1 -1
- package/dist/layout/Controls/index.d.ts +2 -0
- package/dist/layout/Controls/index.js +27 -35
- package/dist/layout/Controls/styles.cjs +23 -21
- package/dist/layout/Controls/styles.js +25 -23
- package/dist/lib/utils.cjs +1 -1
- package/dist/lib/utils.js +16 -18
- package/dist/widgets/CameraFilter/styles.d.ts +7 -9
- package/dist/widgets/FilterTool/styles.cjs +12 -9
- package/dist/widgets/FilterTool/styles.d.ts +9 -11
- package/dist/widgets/FilterTool/styles.js +16 -13
- package/dist/widgets/LightCurvePlot/Plot/index.cjs +1 -1
- package/dist/widgets/LightCurvePlot/Plot/index.js +24 -24
- package/dist/widgets/LightCurvePlot/Plot/styles.cjs +5 -3
- package/dist/widgets/LightCurvePlot/Plot/styles.d.ts +272 -0
- package/dist/widgets/LightCurvePlot/Plot/styles.js +6 -3
- package/dist/widgets/LightCurvePlot/PlotWithCurve/index.cjs +1 -1
- package/dist/widgets/LightCurvePlot/PlotWithCurve/index.js +29 -28
- package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.cjs +1 -1
- package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.js +9 -9
- package/dist/widgets/SourceSelector/Point/styles.d.ts +1 -1
- package/dist/widgets/SourceSelector/SourceSelector.cjs +1 -1
- package/dist/widgets/SourceSelector/SourceSelector.js +19 -19
- package/dist/widgets/SourceSelector/styles.d.ts +1 -1
- package/dist/widgets/SupernovaThreeVector/Histogram/styles.d.ts +1 -1
- package/dist/widgets/SupernovaThreeVector/Skymap/styles.d.ts +7 -7
- package/package.json +2 -2
|
@@ -197,7 +197,7 @@ export declare const Point: import('styled-components').IStyledComponent<"web",
|
|
|
197
197
|
stroke?: string | undefined;
|
|
198
198
|
strokeDasharray?: string | number | undefined;
|
|
199
199
|
strokeDashoffset?: string | number | undefined;
|
|
200
|
-
strokeLinecap?: "inherit" | "
|
|
200
|
+
strokeLinecap?: "inherit" | "butt" | "round" | "square" | undefined;
|
|
201
201
|
strokeLinejoin?: "inherit" | "round" | "miter" | "bevel" | undefined;
|
|
202
202
|
strokeMiterlimit?: string | number | undefined;
|
|
203
203
|
strokeOpacity?: string | number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),l=require("react"),y=require("react-i18next"),z=require("@rubin-epo/epo-react-lib/IconComposer"),E=require("../../layout/AspectRatio/index.cjs"),I=require("../../atomic/Loader/index.cjs"),N=require("./PointSelector/index.cjs"),R=require("./styles.cjs"),U=require("./Message/Message.cjs"),w=require("../../atomic/ElapsedTime/ElapsedTime.cjs"),D=e=>e&&e.__esModule?e:{default:e},G=D(z),H=(e,u)=>{var r;const n={day:0,hour:0},o=e[u];if(!o)return n;const t=(o==null?void 0:o.date)-((r=e[0])==null?void 0:r.date);return t?{day:Math.round(t)||0,hour:Math.round(24/t%24)||0}:n},
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),l=require("react"),y=require("react-i18next"),z=require("@rubin-epo/epo-react-lib/IconComposer"),E=require("../../layout/AspectRatio/index.cjs"),I=require("../../atomic/Loader/index.cjs"),N=require("./PointSelector/index.cjs"),R=require("./styles.cjs"),U=require("./Message/Message.cjs"),w=require("../../atomic/ElapsedTime/ElapsedTime.cjs"),D=e=>e&&e.__esModule?e:{default:e},G=D(z),H=(e,u)=>{var r;const n={day:0,hour:0},o=e[u];if(!o)return n;const t=(o==null?void 0:o.date)-((r=e[0])==null?void 0:r.date);return t?{day:Math.round(t)||0,hour:Math.round(24/t%24)||0}:n},M=({width:e=600,height:u=600,selectedSource:n=[],sources:o,alerts:t=[],activeAlertIndex:r=0,alertChangeCallback:j,selectionCallback:d,blinkConfig:q,isDisplayOnly:c=!1,isLoading:b,className:C})=>{var S;const[_,k]=l.useState(!0),[p,f]=l.useState(),[V,i]=l.useState(!1),{t:g}=y.useTranslation(),h="sourceSelectorWidget",m=!_&&!b,x=()=>{f(g("source_selector.messages.failure")),i(!0)},L=a=>{if(!(!m||c))if(a){const F=!!o.find(({id:W})=>W===a),P=!n.includes(a);F&&P?(d&&d(n.concat(a)),f(s.jsxs(s.Fragment,{children:[s.jsx(G.default,{icon:"checkmark"}),g("source_selector.messages.success")]})),i(!0)):x()}else x()},T=()=>{i(!1)},{day:$,hour:v}=H(t,r),B=c?[(S=t[r])==null?void 0:S.image]:t.map(({image:a})=>a);return s.jsxs(E.default,{ratio:1,className:C,children:[!c&&s.jsx(U.default,{onMessageChangeCallback:T,isVisible:V,forIds:[h],children:p}),s.jsx(R.BackgroundBlinker,{images:B,activeIndex:r,blinkCallback:j,loadedCallback:()=>k(!1),extraControls:t.length>0&&!c&&s.jsx(w.default,{day:$,hour:v}),...q,children:s.jsx(N.default,{id:h,onSelectCallback:L,width:e,height:u,sources:o,selectedSource:n})}),!m&&s.jsx(I.default,{})]})};M.displayName="Widgets.SourceSelector";const J=M;exports.default=J;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as C, jsx as a, Fragment as
|
|
2
|
+
import { jsxs as C, jsx as a, Fragment as U } from "react/jsx-runtime";
|
|
3
3
|
import { useState as f } from "react";
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import
|
|
4
|
+
import { useTranslation as $ } from "react-i18next";
|
|
5
|
+
import q from "@rubin-epo/epo-react-lib/IconComposer";
|
|
6
6
|
import v from "../../layout/AspectRatio/index.js";
|
|
7
7
|
import w from "../../atomic/Loader/index.js";
|
|
8
8
|
import G from "./PointSelector/index.js";
|
|
@@ -10,11 +10,11 @@ import { BackgroundBlinker as H } from "./styles.js";
|
|
|
10
10
|
import J from "./Message/Message.js";
|
|
11
11
|
import K from "../../atomic/ElapsedTime/ElapsedTime.js";
|
|
12
12
|
const Q = (n, c) => {
|
|
13
|
-
var
|
|
13
|
+
var t;
|
|
14
14
|
const s = { day: 0, hour: 0 }, o = n[c];
|
|
15
15
|
if (!o)
|
|
16
16
|
return s;
|
|
17
|
-
const e = (o == null ? void 0 : o.date) - ((
|
|
17
|
+
const e = (o == null ? void 0 : o.date) - ((t = n[0]) == null ? void 0 : t.date);
|
|
18
18
|
return e ? {
|
|
19
19
|
day: Math.round(e) || 0,
|
|
20
20
|
hour: Math.round(24 / e % 24) || 0
|
|
@@ -25,7 +25,7 @@ const Q = (n, c) => {
|
|
|
25
25
|
selectedSource: s = [],
|
|
26
26
|
sources: o,
|
|
27
27
|
alerts: e = [],
|
|
28
|
-
activeAlertIndex:
|
|
28
|
+
activeAlertIndex: t = 0,
|
|
29
29
|
alertChangeCallback: b,
|
|
30
30
|
selectionCallback: l,
|
|
31
31
|
blinkConfig: k,
|
|
@@ -34,24 +34,24 @@ const Q = (n, c) => {
|
|
|
34
34
|
className: V
|
|
35
35
|
}) => {
|
|
36
36
|
var S;
|
|
37
|
-
const [x, j] = f(!0), [B,
|
|
38
|
-
u(
|
|
39
|
-
}, P = (
|
|
37
|
+
const [x, j] = f(!0), [B, d] = f(), [F, m] = f(!1), { t: u } = $(), g = "sourceSelectorWidget", h = !x && !L, p = () => {
|
|
38
|
+
d(u("source_selector.messages.failure")), m(!0);
|
|
39
|
+
}, P = (r) => {
|
|
40
40
|
if (!(!h || i))
|
|
41
|
-
if (
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
/* @__PURE__ */ C(
|
|
45
|
-
/* @__PURE__ */ a(
|
|
46
|
-
|
|
41
|
+
if (r) {
|
|
42
|
+
const E = !!o.find(({ id: R }) => R === r), N = !s.includes(r);
|
|
43
|
+
E && N ? (l && l(s.concat(r)), d(
|
|
44
|
+
/* @__PURE__ */ C(U, { children: [
|
|
45
|
+
/* @__PURE__ */ a(q, { icon: "checkmark" }),
|
|
46
|
+
u("source_selector.messages.success")
|
|
47
47
|
] })
|
|
48
48
|
), m(!0)) : p();
|
|
49
49
|
} else
|
|
50
50
|
p();
|
|
51
51
|
}, T = () => {
|
|
52
52
|
m(!1);
|
|
53
|
-
}, { day: W, hour: _ } = Q(e,
|
|
54
|
-
return /* @__PURE__ */ C(v, { ratio:
|
|
53
|
+
}, { day: W, hour: _ } = Q(e, t), z = i ? [(S = e[t]) == null ? void 0 : S.image] : e.map(({ image: r }) => r);
|
|
54
|
+
return /* @__PURE__ */ C(v, { ratio: 1, className: V, children: [
|
|
55
55
|
!i && /* @__PURE__ */ a(
|
|
56
56
|
J,
|
|
57
57
|
{
|
|
@@ -64,8 +64,8 @@ const Q = (n, c) => {
|
|
|
64
64
|
/* @__PURE__ */ a(
|
|
65
65
|
H,
|
|
66
66
|
{
|
|
67
|
-
images:
|
|
68
|
-
activeIndex:
|
|
67
|
+
images: z,
|
|
68
|
+
activeIndex: t,
|
|
69
69
|
blinkCallback: b,
|
|
70
70
|
loadedCallback: () => j(!1),
|
|
71
71
|
extraControls: e.length > 0 && !i && /* @__PURE__ */ a(K, { day: W, hour: _ }),
|
|
@@ -197,7 +197,7 @@ export declare const SVG: import('styled-components').IStyledComponent<"web", {
|
|
|
197
197
|
stroke?: string | undefined;
|
|
198
198
|
strokeDasharray?: string | number | undefined;
|
|
199
199
|
strokeDashoffset?: string | number | undefined;
|
|
200
|
-
strokeLinecap?: "inherit" | "
|
|
200
|
+
strokeLinecap?: "inherit" | "butt" | "round" | "square" | undefined;
|
|
201
201
|
strokeLinejoin?: "inherit" | "round" | "miter" | "bevel" | undefined;
|
|
202
202
|
strokeMiterlimit?: string | number | undefined;
|
|
203
203
|
strokeOpacity?: string | number | undefined;
|
|
@@ -197,7 +197,7 @@ export declare const YLabel: import('styled-components').IStyledComponent<"web",
|
|
|
197
197
|
stroke?: string | undefined;
|
|
198
198
|
strokeDasharray?: string | number | undefined;
|
|
199
199
|
strokeDashoffset?: string | number | undefined;
|
|
200
|
-
strokeLinecap?: "inherit" | "
|
|
200
|
+
strokeLinecap?: "inherit" | "butt" | "round" | "square" | undefined;
|
|
201
201
|
strokeLinejoin?: "inherit" | "round" | "miter" | "bevel" | undefined;
|
|
202
202
|
strokeMiterlimit?: string | number | undefined;
|
|
203
203
|
strokeOpacity?: string | number | undefined;
|
|
@@ -197,7 +197,7 @@ export declare const Background: import('styled-components').IStyledComponent<"w
|
|
|
197
197
|
stroke?: string | undefined;
|
|
198
198
|
strokeDasharray?: string | number | undefined;
|
|
199
199
|
strokeDashoffset?: string | number | undefined;
|
|
200
|
-
strokeLinecap?: "inherit" | "
|
|
200
|
+
strokeLinecap?: "inherit" | "butt" | "round" | "square" | undefined;
|
|
201
201
|
strokeLinejoin?: "inherit" | "round" | "miter" | "bevel" | undefined;
|
|
202
202
|
strokeMiterlimit?: string | number | undefined;
|
|
203
203
|
strokeOpacity?: string | number | undefined;
|
|
@@ -679,7 +679,7 @@ export declare const Graticule: import('styled-components').IStyledComponent<"we
|
|
|
679
679
|
stroke?: string | undefined;
|
|
680
680
|
strokeDasharray?: string | number | undefined;
|
|
681
681
|
strokeDashoffset?: string | number | undefined;
|
|
682
|
-
strokeLinecap?: "inherit" | "
|
|
682
|
+
strokeLinecap?: "inherit" | "butt" | "round" | "square" | undefined;
|
|
683
683
|
strokeLinejoin?: "inherit" | "round" | "miter" | "bevel" | undefined;
|
|
684
684
|
strokeMiterlimit?: string | number | undefined;
|
|
685
685
|
strokeOpacity?: string | number | undefined;
|
|
@@ -1161,7 +1161,7 @@ export declare const Outline: import('styled-components').IStyledComponent<"web"
|
|
|
1161
1161
|
stroke?: string | undefined;
|
|
1162
1162
|
strokeDasharray?: string | number | undefined;
|
|
1163
1163
|
strokeDashoffset?: string | number | undefined;
|
|
1164
|
-
strokeLinecap?: "inherit" | "
|
|
1164
|
+
strokeLinecap?: "inherit" | "butt" | "round" | "square" | undefined;
|
|
1165
1165
|
strokeLinejoin?: "inherit" | "round" | "miter" | "bevel" | undefined;
|
|
1166
1166
|
strokeMiterlimit?: string | number | undefined;
|
|
1167
1167
|
strokeOpacity?: string | number | undefined;
|
|
@@ -1643,7 +1643,7 @@ export declare const LatLabel: import('styled-components').IStyledComponent<"web
|
|
|
1643
1643
|
stroke?: string | undefined;
|
|
1644
1644
|
strokeDasharray?: string | number | undefined;
|
|
1645
1645
|
strokeDashoffset?: string | number | undefined;
|
|
1646
|
-
strokeLinecap?: "inherit" | "
|
|
1646
|
+
strokeLinecap?: "inherit" | "butt" | "round" | "square" | undefined;
|
|
1647
1647
|
strokeLinejoin?: "inherit" | "round" | "miter" | "bevel" | undefined;
|
|
1648
1648
|
strokeMiterlimit?: string | number | undefined;
|
|
1649
1649
|
strokeOpacity?: string | number | undefined;
|
|
@@ -2125,7 +2125,7 @@ export declare const LongLabel: import('styled-components').IStyledComponent<"we
|
|
|
2125
2125
|
stroke?: string | undefined;
|
|
2126
2126
|
strokeDasharray?: string | number | undefined;
|
|
2127
2127
|
strokeDashoffset?: string | number | undefined;
|
|
2128
|
-
strokeLinecap?: "inherit" | "
|
|
2128
|
+
strokeLinecap?: "inherit" | "butt" | "round" | "square" | undefined;
|
|
2129
2129
|
strokeLinejoin?: "inherit" | "round" | "miter" | "bevel" | undefined;
|
|
2130
2130
|
strokeMiterlimit?: string | number | undefined;
|
|
2131
2131
|
strokeOpacity?: string | number | undefined;
|
|
@@ -2607,7 +2607,7 @@ export declare const ImageStackerWrapper: import('styled-components').IStyledCom
|
|
|
2607
2607
|
stroke?: string | undefined;
|
|
2608
2608
|
strokeDasharray?: string | number | undefined;
|
|
2609
2609
|
strokeDashoffset?: string | number | undefined;
|
|
2610
|
-
strokeLinecap?: "inherit" | "
|
|
2610
|
+
strokeLinecap?: "inherit" | "butt" | "round" | "square" | undefined;
|
|
2611
2611
|
strokeLinejoin?: "inherit" | "round" | "miter" | "bevel" | undefined;
|
|
2612
2612
|
strokeMiterlimit?: string | number | undefined;
|
|
2613
2613
|
strokeOpacity?: string | number | undefined;
|
|
@@ -3089,7 +3089,7 @@ export declare const UserObject: import('styled-components').IStyledComponent<"w
|
|
|
3089
3089
|
stroke?: string | undefined;
|
|
3090
3090
|
strokeDasharray?: string | number | undefined;
|
|
3091
3091
|
strokeDashoffset?: string | number | undefined;
|
|
3092
|
-
strokeLinecap?: "inherit" | "
|
|
3092
|
+
strokeLinecap?: "inherit" | "butt" | "round" | "square" | undefined;
|
|
3093
3093
|
strokeLinejoin?: "inherit" | "round" | "miter" | "bevel" | undefined;
|
|
3094
3094
|
strokeMiterlimit?: string | number | undefined;
|
|
3095
3095
|
strokeOpacity?: string | number | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rubin-epo/epo-widget-lib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Rubin Observatory Education & Public Outreach team React scientific and educational widgets.",
|
|
5
5
|
"author": "Rubin EPO",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"react-i18next": "^12.0.0 || ^13.0.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@rubin-epo/epo-react-lib": "
|
|
41
|
+
"@rubin-epo/epo-react-lib": "^2.0.32",
|
|
42
42
|
"context-filter-polyfill": "^0.3.6",
|
|
43
43
|
"d3-array": "^3.2.4",
|
|
44
44
|
"d3-geo": "^3.1.0",
|