@sentio/ui-dashboard 0.2.2 → 0.2.4
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.css +155 -3
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +63 -23
- package/dist/index.d.ts +63 -23
- package/dist/index.js +970 -394
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +948 -379
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -38,6 +38,7 @@ __export(index_exports, {
|
|
|
38
38
|
BarGuageIcon: () => BarGuageIcon_default,
|
|
39
39
|
BarIcon: () => BarIcon_default,
|
|
40
40
|
ChartLegend: () => ChartLegend,
|
|
41
|
+
ChartTypeButtonGroup: () => ChartTypeButtonGroup,
|
|
41
42
|
EventsFunctionCategories: () => EventsFunctionCategories,
|
|
42
43
|
EventsFunctionMap: () => EventsFunctionMap,
|
|
43
44
|
FunctionInput: () => FunctionInput,
|
|
@@ -58,8 +59,14 @@ __export(index_exports, {
|
|
|
58
59
|
ScatterIcon: () => ScatterIcon_default,
|
|
59
60
|
SystemLabels: () => SystemLabels,
|
|
60
61
|
TableIcon: () => TableIcon_default,
|
|
62
|
+
ValueControls: () => ValueControls,
|
|
63
|
+
ValueFormatters: () => ValueFormatters,
|
|
64
|
+
ValueOptions: () => ValueOptions,
|
|
65
|
+
ValueStringMapping: () => ValueStringMapping,
|
|
61
66
|
defaultBarGaugeConfig: () => defaultConfig2,
|
|
62
67
|
defaultPieConfig: () => defaultConfig,
|
|
68
|
+
defaultValueConfig: () => defaultConfig3,
|
|
69
|
+
defaultValueControlsConfig: () => defaultConfig4,
|
|
63
70
|
isAggrOrRollupFunction: () => isAggrOrRollupFunction,
|
|
64
71
|
sentioColors: () => sentioColors,
|
|
65
72
|
sentioTheme: () => sentioTheme,
|
|
@@ -2612,10 +2619,433 @@ var RefreshButton = (props) => {
|
|
|
2612
2619
|
) });
|
|
2613
2620
|
};
|
|
2614
2621
|
|
|
2622
|
+
// src/charts/ChartTypeButtonGroup.tsx
|
|
2623
|
+
var import_react14 = require("react");
|
|
2624
|
+
var import_react_resize_detector2 = require("react-resize-detector");
|
|
2625
|
+
var import_ui_core8 = require("@sentio/ui-core");
|
|
2626
|
+
|
|
2627
|
+
// src/charts/icons/BarGuageIcon.tsx
|
|
2628
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2629
|
+
var SvgIcon = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2630
|
+
"svg",
|
|
2631
|
+
{
|
|
2632
|
+
width: "14",
|
|
2633
|
+
height: "14",
|
|
2634
|
+
viewBox: "0 0 14 14",
|
|
2635
|
+
fill: "currentColor",
|
|
2636
|
+
className,
|
|
2637
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2638
|
+
children: [
|
|
2639
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2640
|
+
"path",
|
|
2641
|
+
{
|
|
2642
|
+
d: "M2.12791 1.5625V12.4375C2.12791 12.5938 2.07311 12.7267 1.96349 12.836C1.85387 12.9453 1.7207 13 1.56396 13C1.40722 13 1.27404 12.9453 1.16442 12.836C1.05481 12.7267 1 12.5938 1 12.4375V1.5625C1 1.40617 1.05481 1.27333 1.16442 1.164C1.27404 1.05467 1.40722 1 1.56396 1C1.7207 1 1.85387 1.05467 1.96349 1.164C2.07311 1.27333 2.12791 1.40617 2.12791 1.5625ZM1.56396 11.875H12.436C12.5928 11.875 12.726 11.9297 12.8356 12.039C12.9452 12.1483 13 12.2812 13 12.4375C13 12.5938 12.9452 12.7267 12.8356 12.836C12.726 12.9453 12.5928 13 12.436 13H1.56396C1.40722 13 1.27404 12.9453 1.16442 12.836C1.05481 12.7267 1 12.5938 1 12.4375C1 12.2812 1.05481 12.1483 1.16442 12.039C1.27404 11.9297 1.40722 11.875 1.56396 11.875Z",
|
|
2643
|
+
fill: "currentColor"
|
|
2644
|
+
}
|
|
2645
|
+
),
|
|
2646
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2647
|
+
"path",
|
|
2648
|
+
{
|
|
2649
|
+
d: "M3.64159 4.02495H9.43859C9.59493 4.02495 9.72776 3.97014 9.83709 3.86052C9.94643 3.75091 10.0011 3.61773 10.0011 3.46099C10.0011 3.30425 9.94643 3.17108 9.83709 3.06146C9.72776 2.95184 9.59493 2.89703 9.43859 2.89703L3.64159 2.89703C3.48526 2.89703 3.35243 2.95184 3.24309 3.06146C3.13376 3.17108 3.07909 3.30425 3.07909 3.46099C3.07909 3.61773 3.13376 3.75091 3.24309 3.86052C3.35243 3.97014 3.48526 4.02495 3.64159 4.02495Z",
|
|
2650
|
+
fill: "currentColor"
|
|
2651
|
+
}
|
|
2652
|
+
),
|
|
2653
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2654
|
+
"path",
|
|
2655
|
+
{
|
|
2656
|
+
d: "M3.64209 10.0244H11.4701C11.6264 10.0244 11.7593 9.96964 11.8686 9.86002C11.9779 9.7504 12.0326 9.61723 12.0326 9.46049C12.0326 9.30375 11.9779 9.17057 11.8686 9.06096C11.7593 8.95134 11.6264 8.89653 11.4701 8.89653H3.64209C3.48576 8.89653 3.35293 8.95134 3.24359 9.06096C3.13426 9.17057 3.07959 9.30375 3.07959 9.46049C3.07959 9.61723 3.13426 9.7504 3.24359 9.86002C3.35293 9.96964 3.48576 10.0244 3.64209 10.0244Z",
|
|
2657
|
+
fill: "currentColor"
|
|
2658
|
+
}
|
|
2659
|
+
),
|
|
2660
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2661
|
+
"path",
|
|
2662
|
+
{
|
|
2663
|
+
d: "M3.64209 7.01668L7.47009 7.01668C7.62643 7.01634 7.75926 6.95886 7.86859 6.84423C7.97793 6.7296 8.03259 6.5991 8.03259 6.45272C8.03259 6.29598 7.97793 6.1628 7.86859 6.05319C7.75926 5.94357 7.62643 5.88876 7.47009 5.88876H3.64209C3.48576 5.88876 3.35293 5.94357 3.24359 6.05319C3.13426 6.1628 3.07959 6.29598 3.07959 6.45272C3.07959 6.60946 3.13426 6.74263 3.24359 6.85225C3.35293 6.96187 3.48576 7.01668 3.64209 7.01668Z",
|
|
2664
|
+
fill: "currentColor"
|
|
2665
|
+
}
|
|
2666
|
+
)
|
|
2667
|
+
]
|
|
2668
|
+
}
|
|
2669
|
+
);
|
|
2670
|
+
var BarGuageIcon_default = SvgIcon;
|
|
2671
|
+
|
|
2672
|
+
// src/charts/icons/QueryValueIcon.tsx
|
|
2673
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2674
|
+
var SvgIcon2 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2675
|
+
"svg",
|
|
2676
|
+
{
|
|
2677
|
+
width: "14",
|
|
2678
|
+
height: "14",
|
|
2679
|
+
viewBox: "0 0 14 14",
|
|
2680
|
+
fill: "none",
|
|
2681
|
+
className,
|
|
2682
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2683
|
+
children: [
|
|
2684
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("g", { clipPath: "url(#clip0_3670_4424)", children: [
|
|
2685
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2686
|
+
"path",
|
|
2687
|
+
{
|
|
2688
|
+
d: "M11.5 1.5H2.5C1.67157 1.5 1 2.11561 1 2.875V11.125C1 11.8844 1.67157 12.5 2.5 12.5H11.5C12.3284 12.5 13 11.8844 13 11.125V2.875C13 2.11561 12.3284 1.5 11.5 1.5Z",
|
|
2689
|
+
stroke: "currentColor",
|
|
2690
|
+
strokeWidth: "1.16667",
|
|
2691
|
+
strokeLinecap: "round",
|
|
2692
|
+
strokeLinejoin: "round"
|
|
2693
|
+
}
|
|
2694
|
+
),
|
|
2695
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2696
|
+
"path",
|
|
2697
|
+
{
|
|
2698
|
+
d: "M7.98188 5.77273H6.39097L5.75461 5.13636L6.39097 4.5H7.98188L8.61824 5.13636L7.98188 5.77273Z",
|
|
2699
|
+
fill: "currentColor"
|
|
2700
|
+
}
|
|
2701
|
+
),
|
|
2702
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2703
|
+
"path",
|
|
2704
|
+
{
|
|
2705
|
+
d: "M7.98188 11.5H6.39097L5.75461 10.8637L6.39097 10.2273H7.98188L8.61824 10.8637L7.98188 11.5Z",
|
|
2706
|
+
fill: "currentColor"
|
|
2707
|
+
}
|
|
2708
|
+
),
|
|
2709
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2710
|
+
"path",
|
|
2711
|
+
{
|
|
2712
|
+
d: "M8.30005 9.90907V6.09089L8.93641 5.45453L9.57278 6.09089V9.90907L8.93641 10.5454L8.30005 9.90907Z",
|
|
2713
|
+
fill: "currentColor"
|
|
2714
|
+
}
|
|
2715
|
+
),
|
|
2716
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2717
|
+
"path",
|
|
2718
|
+
{
|
|
2719
|
+
d: "M4.80005 9.90907V6.09089L5.43641 5.45453L6.07278 6.09089V9.90907L5.43641 10.5454L4.80005 9.90907Z",
|
|
2720
|
+
fill: "currentColor"
|
|
2721
|
+
}
|
|
2722
|
+
),
|
|
2723
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2724
|
+
"path",
|
|
2725
|
+
{
|
|
2726
|
+
d: "M1 3.5L13 3.5",
|
|
2727
|
+
stroke: "currentColor",
|
|
2728
|
+
strokeWidth: "1.16667",
|
|
2729
|
+
strokeLinecap: "round",
|
|
2730
|
+
strokeLinejoin: "round"
|
|
2731
|
+
}
|
|
2732
|
+
)
|
|
2733
|
+
] }),
|
|
2734
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("clipPath", { id: "clip0_3670_4424", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
|
|
2735
|
+
]
|
|
2736
|
+
}
|
|
2737
|
+
);
|
|
2738
|
+
var QueryValueIcon_default = SvgIcon2;
|
|
2739
|
+
|
|
2740
|
+
// src/charts/icons/TableIcon.tsx
|
|
2741
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2742
|
+
var SvgIcon3 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2743
|
+
"svg",
|
|
2744
|
+
{
|
|
2745
|
+
width: "14",
|
|
2746
|
+
height: "14",
|
|
2747
|
+
viewBox: "0 0 14 14",
|
|
2748
|
+
fill: "none",
|
|
2749
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2750
|
+
className,
|
|
2751
|
+
children: [
|
|
2752
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("g", { clipPath: "url(#clip0_3670_4416)", children: [
|
|
2753
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2754
|
+
"path",
|
|
2755
|
+
{
|
|
2756
|
+
d: "M11.5 2H2.5C1.67157 2 1 2.55964 1 3.25V10.75C1 11.4404 1.67157 12 2.5 12H11.5C12.3284 12 13 11.4404 13 10.75V3.25C13 2.55964 12.3284 2 11.5 2Z",
|
|
2757
|
+
stroke: "currentColor",
|
|
2758
|
+
strokeWidth: "1.16667",
|
|
2759
|
+
strokeLinecap: "round",
|
|
2760
|
+
strokeLinejoin: "round"
|
|
2761
|
+
}
|
|
2762
|
+
),
|
|
2763
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2764
|
+
"path",
|
|
2765
|
+
{
|
|
2766
|
+
d: "M1 5L13 5",
|
|
2767
|
+
stroke: "currentColor",
|
|
2768
|
+
strokeWidth: "1.16667",
|
|
2769
|
+
strokeLinecap: "round",
|
|
2770
|
+
strokeLinejoin: "round"
|
|
2771
|
+
}
|
|
2772
|
+
),
|
|
2773
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2774
|
+
"path",
|
|
2775
|
+
{
|
|
2776
|
+
d: "M6 2L6 12",
|
|
2777
|
+
stroke: "currentColor",
|
|
2778
|
+
strokeWidth: "1.16667",
|
|
2779
|
+
strokeLinecap: "round",
|
|
2780
|
+
strokeLinejoin: "round"
|
|
2781
|
+
}
|
|
2782
|
+
)
|
|
2783
|
+
] }),
|
|
2784
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("clipPath", { id: "clip0_3670_4416", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
|
|
2785
|
+
]
|
|
2786
|
+
}
|
|
2787
|
+
);
|
|
2788
|
+
var TableIcon_default = SvgIcon3;
|
|
2789
|
+
|
|
2790
|
+
// src/charts/icons/AreaIcon.tsx
|
|
2791
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2792
|
+
var SvgIcon4 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2793
|
+
"svg",
|
|
2794
|
+
{
|
|
2795
|
+
width: "14",
|
|
2796
|
+
height: "14",
|
|
2797
|
+
viewBox: "0 0 14 14",
|
|
2798
|
+
fill: "none",
|
|
2799
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2800
|
+
className,
|
|
2801
|
+
children: [
|
|
2802
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("g", { clipPath: "url(#clip0_1774_9545)", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2803
|
+
"path",
|
|
2804
|
+
{
|
|
2805
|
+
d: "M12.6193 13.1249H1.35364C1.21685 13.1249 1.10062 13.0771 1.00495 12.9814C0.909284 12.8857 0.86145 12.7695 0.86145 12.6327V1.35352C0.86145 1.21672 0.909284 1.10049 1.00495 1.00483C1.10062 0.909161 1.21685 0.861328 1.35364 0.861328C1.49043 0.861328 1.60666 0.909161 1.70233 1.00483C1.79799 1.10049 1.84583 1.21672 1.84583 1.35352V12.1405H12.6193C12.7561 12.1405 12.8723 12.1883 12.968 12.284C13.0636 12.3797 13.1115 12.4959 13.1115 12.6327C13.1115 12.7695 13.0636 12.8857 12.968 12.9814C12.8723 13.0771 12.7561 13.1249 12.6193 13.1249ZM2.62501 10.9374L4.22451 8.08008C4.26097 8.0162 4.31566 7.97289 4.38858 7.95014C4.46149 7.92739 4.53441 7.92972 4.60733 7.95714L6.12501 8.66808L7.73851 6.33008C7.83885 6.19329 7.96193 6.16135 8.10776 6.23427L9.61189 6.99989L11.7994 3.56814C11.8633 3.46781 11.9521 3.43368 12.0658 3.46577C12.1796 3.49785 12.2366 3.5731 12.2369 3.69152V10.8009C12.2369 10.9467 12.1845 11.072 12.0798 11.1767C11.9751 11.2814 11.8498 11.3338 11.704 11.3338H2.87176C2.77143 11.3338 2.69399 11.2905 2.63945 11.2038C2.58491 11.1172 2.58039 11.0284 2.62589 10.9374H2.62501Z",
|
|
2806
|
+
fill: "currentColor"
|
|
2807
|
+
}
|
|
2808
|
+
) }),
|
|
2809
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("clipPath", { id: "clip0_1774_9545", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
|
|
2810
|
+
]
|
|
2811
|
+
}
|
|
2812
|
+
);
|
|
2813
|
+
var AreaIcon_default = SvgIcon4;
|
|
2814
|
+
|
|
2815
|
+
// src/charts/icons/BarIcon.tsx
|
|
2816
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2817
|
+
var SvgIcon5 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2818
|
+
"svg",
|
|
2819
|
+
{
|
|
2820
|
+
width: "14",
|
|
2821
|
+
height: "14",
|
|
2822
|
+
viewBox: "0 0 14 14",
|
|
2823
|
+
fill: "none",
|
|
2824
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2825
|
+
className,
|
|
2826
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2827
|
+
"path",
|
|
2828
|
+
{
|
|
2829
|
+
d: "M2.12791 1.5625V12.4375C2.12791 12.5938 2.07311 12.7267 1.96349 12.836C1.85387 12.9453 1.7207 13 1.56396 13C1.40722 13 1.27404 12.9453 1.16442 12.836C1.05481 12.7267 1 12.5938 1 12.4375V1.5625C1 1.40617 1.05481 1.27333 1.16442 1.164C1.27404 1.05467 1.40722 1 1.56396 1C1.7207 1 1.85387 1.05467 1.96349 1.164C2.07311 1.27333 2.12791 1.40617 2.12791 1.5625ZM1.56396 11.875H12.436C12.5928 11.875 12.726 11.9297 12.8356 12.039C12.9452 12.1483 13 12.2812 13 12.4375C13 12.5938 12.9452 12.7267 12.8356 12.836C12.726 12.9453 12.5928 13 12.436 13H1.56396C1.40722 13 1.27404 12.9453 1.16442 12.836C1.05481 12.7267 1 12.5938 1 12.4375C1 12.2812 1.05481 12.1483 1.16442 12.039C1.27404 11.9297 1.40722 11.875 1.56396 11.875ZM5.12014 4.578V10.375C5.12014 10.5313 5.06534 10.6642 4.95572 10.7735C4.8461 10.8828 4.71293 10.9375 4.55619 10.9375C4.39945 10.9375 4.26627 10.8828 4.15665 10.7735C4.04704 10.6642 3.99223 10.5313 3.99223 10.375V4.578C3.99223 4.42167 4.04704 4.28883 4.15665 4.1795C4.26627 4.07017 4.39945 4.0155 4.55619 4.0155C4.71293 4.0155 4.8461 4.07017 4.95572 4.1795C5.06534 4.28883 5.12014 4.42167 5.12014 4.578ZM11.1196 2.5465V10.3745C11.1196 10.5308 11.0648 10.6637 10.9552 10.773C10.8456 10.8823 10.7124 10.937 10.5557 10.937C10.3989 10.937 10.2658 10.8823 10.1562 10.773C10.0465 10.6637 9.99173 10.5308 9.99173 10.3745V2.5465C9.99173 2.39017 10.0465 2.25733 10.1562 2.148C10.2658 2.03867 10.3989 1.984 10.5557 1.984C10.7124 1.984 10.8456 2.03867 10.9552 2.148C11.0648 2.25733 11.1196 2.39017 11.1196 2.5465ZM8.11187 6.5465V10.3745C8.11187 10.5308 8.05706 10.6637 7.94745 10.773C7.83783 10.8823 7.70465 10.937 7.54792 10.937C7.39118 10.937 7.258 10.8823 7.14838 10.773C7.03877 10.6637 6.98396 10.5308 6.98396 10.3745V6.5465C6.98396 6.39017 7.03877 6.25733 7.14838 6.148C7.258 6.03867 7.39118 5.984 7.54792 5.984C7.69429 5.984 7.8248 6.03867 7.93943 6.148C8.05406 6.25733 8.11154 6.39017 8.11187 6.5465Z",
|
|
2830
|
+
fill: "currentColor"
|
|
2831
|
+
}
|
|
2832
|
+
)
|
|
2833
|
+
}
|
|
2834
|
+
);
|
|
2835
|
+
var BarIcon_default = SvgIcon5;
|
|
2836
|
+
|
|
2837
|
+
// src/charts/icons/LineIcon.tsx
|
|
2838
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2839
|
+
var SvgIcon6 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2840
|
+
"svg",
|
|
2841
|
+
{
|
|
2842
|
+
width: "14",
|
|
2843
|
+
height: "14",
|
|
2844
|
+
viewBox: "0 0 14 14",
|
|
2845
|
+
fill: "none",
|
|
2846
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2847
|
+
className,
|
|
2848
|
+
children: [
|
|
2849
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("g", { clipPath: "url(#clip0_1774_9563)", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2850
|
+
"path",
|
|
2851
|
+
{
|
|
2852
|
+
d: "M12.6191 13.1249H1.35352C1.21672 13.1249 1.10049 13.0771 1.00483 12.9814C0.909161 12.8857 0.861328 12.7695 0.861328 12.6327V1.35352C0.861328 1.21672 0.909161 1.10049 1.00483 1.00483C1.10049 0.909161 1.21672 0.861328 1.35352 0.861328C1.49031 0.861328 1.60654 0.909161 1.7022 1.00483C1.79787 1.10049 1.8457 1.21672 1.8457 1.35352V12.1405H12.6191C12.7559 12.1405 12.8722 12.1883 12.9678 12.284C13.0635 12.3797 13.1113 12.4959 13.1113 12.6327C13.1113 12.7695 13.0635 12.8857 12.9678 12.9814C12.8722 13.0771 12.7559 13.1249 12.6191 13.1249ZM5.26345 10.1582C5.0902 10.1582 4.95341 10.0853 4.85308 9.93945L2.7067 6.52127C2.63379 6.40285 2.61104 6.27758 2.63845 6.14545C2.66587 6.01333 2.73645 5.91081 2.8502 5.83789C2.96395 5.76497 3.08704 5.74222 3.21945 5.76964C3.35187 5.79706 3.45439 5.86545 3.52702 5.97483L5.05827 8.46333L5.68739 6.04352C5.72385 5.89768 5.81047 5.79283 5.94727 5.72895L8.43576 4.52583C8.55418 4.47099 8.67274 4.45962 8.79145 4.4917C8.91016 4.52379 9.00583 4.59437 9.07845 4.70345L10.3227 6.72689L12.155 1.21702C12.2005 1.08927 12.2826 0.993599 12.4013 0.930016C12.52 0.866432 12.6431 0.857245 12.7705 0.902453C12.898 0.947661 12.9936 1.02977 13.0575 1.14877C13.1214 1.26777 13.1306 1.39085 13.0851 1.51802L10.9247 8.03939C10.8608 8.24006 10.724 8.35177 10.5143 8.37452C10.3046 8.39727 10.1451 8.32202 10.0357 8.14877L8.46333 5.60558L6.59039 6.50814L5.74252 9.78939C5.68768 9.9991 5.55556 10.1177 5.34614 10.1451C5.31872 10.1541 5.29131 10.1586 5.26389 10.1586L5.26345 10.1582Z",
|
|
2853
|
+
fill: "currentColor"
|
|
2854
|
+
}
|
|
2855
|
+
) }),
|
|
2856
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("clipPath", { id: "clip0_1774_9563", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
|
|
2857
|
+
]
|
|
2858
|
+
}
|
|
2859
|
+
);
|
|
2860
|
+
var LineIcon_default = SvgIcon6;
|
|
2861
|
+
|
|
2862
|
+
// src/charts/icons/PieIcon.tsx
|
|
2863
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2864
|
+
var SvgIcon7 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2865
|
+
"svg",
|
|
2866
|
+
{
|
|
2867
|
+
width: "14",
|
|
2868
|
+
height: "14",
|
|
2869
|
+
viewBox: "0 0 14 14",
|
|
2870
|
+
fill: "none",
|
|
2871
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2872
|
+
className,
|
|
2873
|
+
children: [
|
|
2874
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("g", { clipPath: "url(#clip0_28267_7202)", children: [
|
|
2875
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2876
|
+
"path",
|
|
2877
|
+
{
|
|
2878
|
+
d: "M5.83329 1.86662C4.92079 2.07816 4.08149 2.52998 3.40247 3.17523C2.72345 3.82048 2.22942 4.63564 1.97164 5.53618C1.71386 6.43671 1.70171 7.38982 1.93644 8.29663C2.17118 9.20345 2.64426 10.0309 3.30661 10.6933C3.96896 11.3556 4.79646 11.8287 5.70327 12.0635C6.61009 12.2982 7.56319 12.286 8.46373 12.0283C9.36426 11.7705 10.1794 11.2765 10.8247 10.5974C11.4699 9.91841 11.9217 9.07912 12.1333 8.16662C12.1333 8.01191 12.0718 7.86353 11.9624 7.75414C11.853 7.64474 11.7047 7.58328 11.55 7.58328H7.58329C7.27387 7.58328 6.97713 7.46037 6.75833 7.24157C6.53954 7.02278 6.41662 6.72604 6.41662 6.41662V2.33328C6.40938 2.26417 6.38848 2.19719 6.35515 2.13621C6.32182 2.07524 6.27671 2.02149 6.22245 1.97808C6.16819 1.93467 6.10585 1.90247 6.03905 1.88333C5.97224 1.8642 5.90231 1.85852 5.83329 1.86662Z",
|
|
2879
|
+
stroke: "currentColor",
|
|
2880
|
+
strokeWidth: "1.16667",
|
|
2881
|
+
strokeLinecap: "round",
|
|
2882
|
+
strokeLinejoin: "round"
|
|
2883
|
+
}
|
|
2884
|
+
),
|
|
2885
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2886
|
+
"path",
|
|
2887
|
+
{
|
|
2888
|
+
d: "M8.75 2.04175C9.49067 2.30255 10.1634 2.72617 10.7187 3.28142C11.2739 3.83668 11.6975 4.50941 11.9583 5.25008H9.33333C9.17862 5.25008 9.03025 5.18862 8.92085 5.07923C8.81146 4.96983 8.75 4.82146 8.75 4.66675V2.04175Z",
|
|
2889
|
+
stroke: "currentColor",
|
|
2890
|
+
strokeWidth: "1.16667",
|
|
2891
|
+
strokeLinecap: "round",
|
|
2892
|
+
strokeLinejoin: "round"
|
|
2893
|
+
}
|
|
2894
|
+
)
|
|
2895
|
+
] }),
|
|
2896
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("clipPath", { id: "clip0_28267_7202", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
|
|
2897
|
+
]
|
|
2898
|
+
}
|
|
2899
|
+
);
|
|
2900
|
+
var PieIcon_default = SvgIcon7;
|
|
2901
|
+
|
|
2902
|
+
// src/charts/icons/ScatterIcon.tsx
|
|
2903
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2904
|
+
var SvgIcon8 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
2905
|
+
"svg",
|
|
2906
|
+
{
|
|
2907
|
+
width: "14",
|
|
2908
|
+
height: "14",
|
|
2909
|
+
viewBox: "0 0 14 14",
|
|
2910
|
+
fill: "none",
|
|
2911
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2912
|
+
className,
|
|
2913
|
+
children: [
|
|
2914
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("g", { clipPath: "url(#clip0_28248_7302)", children: [
|
|
2915
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2916
|
+
"path",
|
|
2917
|
+
{
|
|
2918
|
+
d: "M1.75 1.75V12.25H12.25",
|
|
2919
|
+
stroke: "currentColor",
|
|
2920
|
+
strokeWidth: "1.16667",
|
|
2921
|
+
strokeLinecap: "round",
|
|
2922
|
+
strokeLinejoin: "round"
|
|
2923
|
+
}
|
|
2924
|
+
),
|
|
2925
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2926
|
+
"path",
|
|
2927
|
+
{
|
|
2928
|
+
d: "M4.66663 8.75879V8.76754",
|
|
2929
|
+
stroke: "currentColor",
|
|
2930
|
+
strokeWidth: "1.16667",
|
|
2931
|
+
strokeLinecap: "round",
|
|
2932
|
+
strokeLinejoin: "round"
|
|
2933
|
+
}
|
|
2934
|
+
),
|
|
2935
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2936
|
+
"path",
|
|
2937
|
+
{
|
|
2938
|
+
d: "M9.33337 9.34204V9.35079",
|
|
2939
|
+
stroke: "currentColor",
|
|
2940
|
+
strokeWidth: "1.16667",
|
|
2941
|
+
strokeLinecap: "round",
|
|
2942
|
+
strokeLinejoin: "round"
|
|
2943
|
+
}
|
|
2944
|
+
),
|
|
2945
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2946
|
+
"path",
|
|
2947
|
+
{
|
|
2948
|
+
d: "M4.66663 4.10083V4.10958",
|
|
2949
|
+
stroke: "currentColor",
|
|
2950
|
+
strokeWidth: "1.16667",
|
|
2951
|
+
strokeLinecap: "round",
|
|
2952
|
+
strokeLinejoin: "round"
|
|
2953
|
+
}
|
|
2954
|
+
),
|
|
2955
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2956
|
+
"path",
|
|
2957
|
+
{
|
|
2958
|
+
d: "M7 6.43408V6.44283",
|
|
2959
|
+
stroke: "currentColor",
|
|
2960
|
+
strokeWidth: "1.16667",
|
|
2961
|
+
strokeLinecap: "round",
|
|
2962
|
+
strokeLinejoin: "round"
|
|
2963
|
+
}
|
|
2964
|
+
),
|
|
2965
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2966
|
+
"path",
|
|
2967
|
+
{
|
|
2968
|
+
d: "M11.0834 6.43408V6.44283",
|
|
2969
|
+
stroke: "currentColor",
|
|
2970
|
+
strokeWidth: "1.16667",
|
|
2971
|
+
strokeLinecap: "round",
|
|
2972
|
+
strokeLinejoin: "round"
|
|
2973
|
+
}
|
|
2974
|
+
)
|
|
2975
|
+
] }),
|
|
2976
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("clipPath", { id: "clip0_28248_7302", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
|
|
2977
|
+
]
|
|
2978
|
+
}
|
|
2979
|
+
);
|
|
2980
|
+
var ScatterIcon_default = SvgIcon8;
|
|
2981
|
+
|
|
2982
|
+
// src/charts/ChartTypeButtonGroup.tsx
|
|
2983
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2984
|
+
var visuals = [
|
|
2985
|
+
{
|
|
2986
|
+
label: "Lines",
|
|
2987
|
+
value: "LINE",
|
|
2988
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(LineIcon_default, { className: "mr-1 h-4 w-4" })
|
|
2989
|
+
},
|
|
2990
|
+
{ label: "Bars", value: "BAR", icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(BarIcon_default, { className: "mr-1 h-4 w-4" }) },
|
|
2991
|
+
{
|
|
2992
|
+
label: "Areas",
|
|
2993
|
+
value: "AREA",
|
|
2994
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AreaIcon_default, { className: "mr-1 h-4 w-4" })
|
|
2995
|
+
},
|
|
2996
|
+
{
|
|
2997
|
+
label: "Bar Gauge",
|
|
2998
|
+
value: "BAR_GAUGE",
|
|
2999
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(BarGuageIcon_default, { className: "mr-1 h-4 w-4" })
|
|
3000
|
+
},
|
|
3001
|
+
{
|
|
3002
|
+
label: "Scatter",
|
|
3003
|
+
value: "SCATTER",
|
|
3004
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ScatterIcon_default, { className: "mr-1 h-4 w-4" })
|
|
3005
|
+
},
|
|
3006
|
+
{
|
|
3007
|
+
label: "Query Value",
|
|
3008
|
+
value: "QUERY_VALUE",
|
|
3009
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(QueryValueIcon_default, { className: "mr-1 h-4 w-4" })
|
|
3010
|
+
},
|
|
3011
|
+
{
|
|
3012
|
+
label: "Table",
|
|
3013
|
+
value: "TABLE",
|
|
3014
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TableIcon_default, { className: "mr-1 h-4 w-4" })
|
|
3015
|
+
},
|
|
3016
|
+
{ label: "Pie", value: "PIE", icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PieIcon_default, { className: "mr-1 h-4 w-4" }) }
|
|
3017
|
+
];
|
|
3018
|
+
var ChartTypeButtonGroup = ({
|
|
3019
|
+
value,
|
|
3020
|
+
onChange,
|
|
3021
|
+
small = false
|
|
3022
|
+
}) => {
|
|
3023
|
+
const [hideLabel, setHideLabel] = (0, import_react14.useState)(small);
|
|
3024
|
+
const { ref } = (0, import_react_resize_detector2.useResizeDetector)({
|
|
3025
|
+
onResize: ({ width }) => {
|
|
3026
|
+
if (width) {
|
|
3027
|
+
setHideLabel(width < 800);
|
|
3028
|
+
}
|
|
3029
|
+
},
|
|
3030
|
+
refreshMode: "throttle",
|
|
3031
|
+
refreshRate: 100
|
|
3032
|
+
});
|
|
3033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "w-full flex-1", ref, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3034
|
+
import_ui_core8.NewButtonGroup,
|
|
3035
|
+
{
|
|
3036
|
+
buttons: visuals,
|
|
3037
|
+
value,
|
|
3038
|
+
onChange,
|
|
3039
|
+
small,
|
|
3040
|
+
hideLabel
|
|
3041
|
+
}
|
|
3042
|
+
) });
|
|
3043
|
+
};
|
|
3044
|
+
|
|
2615
3045
|
// src/charts/options/LineControls.tsx
|
|
2616
3046
|
var import_immer4 = require("immer");
|
|
2617
|
-
var
|
|
2618
|
-
var
|
|
3047
|
+
var import_ui_core9 = require("@sentio/ui-core");
|
|
3048
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2619
3049
|
var lineStyles = [
|
|
2620
3050
|
{ label: "Solid", value: "Solid" },
|
|
2621
3051
|
{ label: "Dotted", value: "Dotted" }
|
|
@@ -2635,14 +3065,14 @@ var LineControls = ({ config, defaultOpen, onChange }) => {
|
|
|
2635
3065
|
})
|
|
2636
3066
|
);
|
|
2637
3067
|
};
|
|
2638
|
-
return /* @__PURE__ */ (0,
|
|
2639
|
-
|
|
3068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3069
|
+
import_ui_core9.DisclosurePanel,
|
|
2640
3070
|
{
|
|
2641
3071
|
title: "Line style",
|
|
2642
3072
|
containerClassName: "w-full bg-default-bg",
|
|
2643
|
-
children: /* @__PURE__ */ (0,
|
|
2644
|
-
/* @__PURE__ */ (0,
|
|
2645
|
-
|
|
3073
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
3074
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3075
|
+
import_ui_core9.NewButtonGroup,
|
|
2646
3076
|
{
|
|
2647
3077
|
buttons: lineStyles,
|
|
2648
3078
|
value: config?.style || "Solid",
|
|
@@ -2650,8 +3080,8 @@ var LineControls = ({ config, defaultOpen, onChange }) => {
|
|
|
2650
3080
|
small: true
|
|
2651
3081
|
}
|
|
2652
3082
|
),
|
|
2653
|
-
/* @__PURE__ */ (0,
|
|
2654
|
-
|
|
3083
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3084
|
+
import_ui_core9.Checkbox,
|
|
2655
3085
|
{
|
|
2656
3086
|
label: "Smooth Curves",
|
|
2657
3087
|
checked: config?.smooth,
|
|
@@ -2664,16 +3094,16 @@ var LineControls = ({ config, defaultOpen, onChange }) => {
|
|
|
2664
3094
|
};
|
|
2665
3095
|
|
|
2666
3096
|
// src/charts/options/LabelControls.tsx
|
|
2667
|
-
var
|
|
3097
|
+
var import_react15 = require("react");
|
|
2668
3098
|
var import_immer5 = require("immer");
|
|
2669
|
-
var
|
|
2670
|
-
var
|
|
3099
|
+
var import_ui_core10 = require("@sentio/ui-core");
|
|
3100
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2671
3101
|
var initialConfig = {
|
|
2672
3102
|
columns: [],
|
|
2673
3103
|
alias: ""
|
|
2674
3104
|
};
|
|
2675
3105
|
var LabelControls = ({ config, setConfig, defaultOpen }) => {
|
|
2676
|
-
(0,
|
|
3106
|
+
(0, import_react15.useEffect)(() => {
|
|
2677
3107
|
if (config?.columns && config.columns.length > 0 && !config.alias) {
|
|
2678
3108
|
const aliasParts = [];
|
|
2679
3109
|
config.columns.forEach((colConfig) => {
|
|
@@ -2703,31 +3133,31 @@ var LabelControls = ({ config, setConfig, defaultOpen }) => {
|
|
|
2703
3133
|
})
|
|
2704
3134
|
);
|
|
2705
3135
|
};
|
|
2706
|
-
const _defaultOpen = (0,
|
|
3136
|
+
const _defaultOpen = (0, import_react15.useMemo)(() => {
|
|
2707
3137
|
if (defaultOpen) {
|
|
2708
3138
|
return true;
|
|
2709
3139
|
}
|
|
2710
3140
|
return config?.alias !== "" || config?.columns && config.columns.length > 0;
|
|
2711
3141
|
}, [config, defaultOpen]);
|
|
2712
|
-
return /* @__PURE__ */ (0,
|
|
2713
|
-
|
|
3142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3143
|
+
import_ui_core10.DisclosurePanel,
|
|
2714
3144
|
{
|
|
2715
3145
|
title: "Label Controls",
|
|
2716
3146
|
defaultOpen: _defaultOpen,
|
|
2717
3147
|
containerClassName: "w-full bg-default-bg",
|
|
2718
|
-
children: /* @__PURE__ */ (0,
|
|
2719
|
-
/* @__PURE__ */ (0,
|
|
2720
|
-
/* @__PURE__ */ (0,
|
|
3148
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3149
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "inline-flex h-8", children: [
|
|
3150
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "sm:text-icontent border-main inline-flex items-center rounded-l-md border border-r-0 bg-gray-50 px-2 font-medium", children: [
|
|
2721
3151
|
"Label Alias",
|
|
2722
|
-
/* @__PURE__ */ (0,
|
|
2723
|
-
|
|
3152
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3153
|
+
import_ui_core10.HelpIcon,
|
|
2724
3154
|
{
|
|
2725
|
-
text: /* @__PURE__ */ (0,
|
|
2726
|
-
/* @__PURE__ */ (0,
|
|
2727
|
-
/* @__PURE__ */ (0,
|
|
3155
|
+
text: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "text-icontent text-text-foreground", children: [
|
|
3156
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { children: "Series name override or template." }),
|
|
3157
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { children: [
|
|
2728
3158
|
"Ex.",
|
|
2729
3159
|
" ",
|
|
2730
|
-
/* @__PURE__ */ (0,
|
|
3160
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-primary mx-1 font-semibold italic", children: "{{contract}}" }),
|
|
2731
3161
|
" ",
|
|
2732
3162
|
"will be replaced with the value of the contract label."
|
|
2733
3163
|
] })
|
|
@@ -2735,7 +3165,7 @@ var LabelControls = ({ config, setConfig, defaultOpen }) => {
|
|
|
2735
3165
|
}
|
|
2736
3166
|
)
|
|
2737
3167
|
] }),
|
|
2738
|
-
/* @__PURE__ */ (0,
|
|
3168
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2739
3169
|
"input",
|
|
2740
3170
|
{
|
|
2741
3171
|
type: "text",
|
|
@@ -2746,8 +3176,8 @@ var LabelControls = ({ config, setConfig, defaultOpen }) => {
|
|
|
2746
3176
|
}
|
|
2747
3177
|
)
|
|
2748
3178
|
] }),
|
|
2749
|
-
/* @__PURE__ */ (0,
|
|
2750
|
-
|
|
3179
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3180
|
+
import_ui_core10.Button,
|
|
2751
3181
|
{
|
|
2752
3182
|
type: "button",
|
|
2753
3183
|
role: "link",
|
|
@@ -2765,8 +3195,8 @@ var LabelControls = ({ config, setConfig, defaultOpen }) => {
|
|
|
2765
3195
|
// src/charts/options/PieChartControls.tsx
|
|
2766
3196
|
var import_immer6 = require("immer");
|
|
2767
3197
|
var import_lodash3 = require("lodash");
|
|
2768
|
-
var
|
|
2769
|
-
var
|
|
3198
|
+
var import_ui_core11 = require("@sentio/ui-core");
|
|
3199
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2770
3200
|
var defaultConfig = {
|
|
2771
3201
|
pieType: "Pie",
|
|
2772
3202
|
calculation: "LAST",
|
|
@@ -2801,15 +3231,15 @@ function PieChartControls({ config, defaultOpen, onChange }) {
|
|
|
2801
3231
|
})
|
|
2802
3232
|
);
|
|
2803
3233
|
}
|
|
2804
|
-
return /* @__PURE__ */ (0,
|
|
2805
|
-
|
|
3234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3235
|
+
import_ui_core11.DisclosurePanel,
|
|
2806
3236
|
{
|
|
2807
3237
|
title: "Pie Chart Options",
|
|
2808
3238
|
defaultOpen,
|
|
2809
3239
|
containerClassName: "w-full bg-default-bg",
|
|
2810
|
-
children: /* @__PURE__ */ (0,
|
|
2811
|
-
/* @__PURE__ */ (0,
|
|
2812
|
-
|
|
3240
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
3241
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "shadow-xs flex rounded-md", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3242
|
+
import_ui_core11.NewButtonGroup,
|
|
2813
3243
|
{
|
|
2814
3244
|
small: true,
|
|
2815
3245
|
buttons: PieTypeItems,
|
|
@@ -2817,22 +3247,22 @@ function PieChartControls({ config, defaultOpen, onChange }) {
|
|
|
2817
3247
|
onChange: onPieTypeChange
|
|
2818
3248
|
}
|
|
2819
3249
|
) }),
|
|
2820
|
-
/* @__PURE__ */ (0,
|
|
2821
|
-
/* @__PURE__ */ (0,
|
|
2822
|
-
/* @__PURE__ */ (0,
|
|
3250
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "shadow-xs flex rounded-md", children: [
|
|
3251
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "sm:text-ilabel border-main inline-flex items-center rounded-l-md border border-r-0 bg-gray-50 px-3 ", children: "Calculation" }),
|
|
3252
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2823
3253
|
"select",
|
|
2824
3254
|
{
|
|
2825
3255
|
value: config.calculation,
|
|
2826
|
-
className: "sm:text-ilabel text-text-foreground border-main
|
|
3256
|
+
className: "sm:text-ilabel text-text-foreground border-main hover:border-primary-600 focus:ring-3 focus:ring-primary-600/30 focus:border-primary-600 inline-flex items-center rounded-r-md border pl-4 pr-7",
|
|
2827
3257
|
onChange: (e) => onCalculationChange(e.target.value),
|
|
2828
3258
|
children: CalculationItems.map((d) => {
|
|
2829
|
-
return /* @__PURE__ */ (0,
|
|
3259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: d.value, children: d.label }, d.value);
|
|
2830
3260
|
})
|
|
2831
3261
|
}
|
|
2832
3262
|
)
|
|
2833
3263
|
] }),
|
|
2834
|
-
/* @__PURE__ */ (0,
|
|
2835
|
-
|
|
3264
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3265
|
+
import_ui_core11.Checkbox,
|
|
2836
3266
|
{
|
|
2837
3267
|
checked: config?.showValue,
|
|
2838
3268
|
onChange: (v) => toggle("showValue", v),
|
|
@@ -2840,8 +3270,8 @@ function PieChartControls({ config, defaultOpen, onChange }) {
|
|
|
2840
3270
|
labelClassName: "whitespace-nowrap"
|
|
2841
3271
|
}
|
|
2842
3272
|
),
|
|
2843
|
-
/* @__PURE__ */ (0,
|
|
2844
|
-
|
|
3273
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3274
|
+
import_ui_core11.Checkbox,
|
|
2845
3275
|
{
|
|
2846
3276
|
checked: config?.showPercent,
|
|
2847
3277
|
onChange: (v) => toggle("showPercent", v),
|
|
@@ -2849,8 +3279,8 @@ function PieChartControls({ config, defaultOpen, onChange }) {
|
|
|
2849
3279
|
labelClassName: "whitespace-nowrap"
|
|
2850
3280
|
}
|
|
2851
3281
|
),
|
|
2852
|
-
/* @__PURE__ */ (0,
|
|
2853
|
-
|
|
3282
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3283
|
+
import_ui_core11.Checkbox,
|
|
2854
3284
|
{
|
|
2855
3285
|
checked: config?.absValue,
|
|
2856
3286
|
onChange: (v) => toggle("absValue", v),
|
|
@@ -2866,8 +3296,8 @@ function PieChartControls({ config, defaultOpen, onChange }) {
|
|
|
2866
3296
|
// src/charts/options/BarGaugeControls.tsx
|
|
2867
3297
|
var import_immer7 = require("immer");
|
|
2868
3298
|
var import_lodash4 = require("lodash");
|
|
2869
|
-
var
|
|
2870
|
-
var
|
|
3299
|
+
var import_ui_core12 = require("@sentio/ui-core");
|
|
3300
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2871
3301
|
var defaultConfig2 = {
|
|
2872
3302
|
direction: "HORIZONTAL",
|
|
2873
3303
|
calculation: "LAST",
|
|
@@ -2920,62 +3350,62 @@ function BarGaugeControls({ config, defaultOpen, onChange }) {
|
|
|
2920
3350
|
})
|
|
2921
3351
|
);
|
|
2922
3352
|
}
|
|
2923
|
-
return /* @__PURE__ */ (0,
|
|
2924
|
-
|
|
3353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3354
|
+
import_ui_core12.DisclosurePanel,
|
|
2925
3355
|
{
|
|
2926
3356
|
title: "Bar Gauge Options",
|
|
2927
3357
|
defaultOpen,
|
|
2928
3358
|
containerClassName: "w-full bg-default-bg",
|
|
2929
|
-
children: /* @__PURE__ */ (0,
|
|
2930
|
-
/* @__PURE__ */ (0,
|
|
2931
|
-
/* @__PURE__ */ (0,
|
|
2932
|
-
/* @__PURE__ */ (0,
|
|
3359
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
3360
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "shadow-xs flex rounded-md", children: [
|
|
3361
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "sm:text-ilabel border-main inline-flex items-center rounded-l-md border border-r-0 bg-gray-50 px-3 ", children: "Direction" }),
|
|
3362
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2933
3363
|
"select",
|
|
2934
3364
|
{
|
|
2935
3365
|
value: config.direction,
|
|
2936
|
-
className: "sm:text-ilabel border-main text-text-foreground
|
|
3366
|
+
className: "sm:text-ilabel border-main text-text-foreground hover:border-primary-600 focus:ring-3 focus:ring-primary-600/30 focus:border-primary-600 inline-flex items-center rounded-r-md border pl-4 pr-7",
|
|
2937
3367
|
onChange: (e) => onDirectionChange(e.target.value),
|
|
2938
3368
|
children: directionItems.map((d) => {
|
|
2939
|
-
return /* @__PURE__ */ (0,
|
|
3369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: d.value, children: d.label }, d.value);
|
|
2940
3370
|
})
|
|
2941
3371
|
}
|
|
2942
3372
|
)
|
|
2943
3373
|
] }),
|
|
2944
|
-
/* @__PURE__ */ (0,
|
|
2945
|
-
/* @__PURE__ */ (0,
|
|
2946
|
-
/* @__PURE__ */ (0,
|
|
3374
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "shadow-xs flex rounded-md", children: [
|
|
3375
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "sm:text-ilabel border-main inline-flex items-center rounded-l-md border border-r-0 bg-gray-50 px-3 ", children: "Calculation" }),
|
|
3376
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2947
3377
|
"select",
|
|
2948
3378
|
{
|
|
2949
3379
|
value: config.calculation,
|
|
2950
|
-
className: "sm:text-ilabel border-main text-text-foreground
|
|
3380
|
+
className: "sm:text-ilabel border-main text-text-foreground hover:border-primary-600 focus:ring-3 focus:ring-primary-600/30 focus:border-primary-600 inline-flex items-center rounded-r-md border pl-4 pr-7",
|
|
2951
3381
|
onChange: (e) => onCalculationChange(e.target.value),
|
|
2952
3382
|
children: CalculationItems2.map((d) => {
|
|
2953
|
-
return /* @__PURE__ */ (0,
|
|
3383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: d.value, children: d.label }, d.value);
|
|
2954
3384
|
})
|
|
2955
3385
|
}
|
|
2956
3386
|
)
|
|
2957
3387
|
] }),
|
|
2958
|
-
/* @__PURE__ */ (0,
|
|
2959
|
-
/* @__PURE__ */ (0,
|
|
2960
|
-
/* @__PURE__ */ (0,
|
|
3388
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "shadow-xs flex rounded-md", children: [
|
|
3389
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "sm:text-ilabel border-main inline-flex items-center whitespace-nowrap rounded-l-md border border-r-0 bg-gray-50 px-3", children: "Sort by" }),
|
|
3390
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2961
3391
|
"select",
|
|
2962
3392
|
{
|
|
2963
3393
|
value: config?.sort?.sortBy,
|
|
2964
|
-
className: "sm:text-ilabel border-main text-text-foreground
|
|
3394
|
+
className: "sm:text-ilabel border-main text-text-foreground hover:border-primary-600 focus:ring-3 focus:ring-primary-600/30 focus:border-primary-600 inline-flex items-center border pl-4 pr-7",
|
|
2965
3395
|
onChange: (e) => onSortByChange(e.target.value),
|
|
2966
3396
|
children: sortByItems.map((d) => {
|
|
2967
|
-
return /* @__PURE__ */ (0,
|
|
3397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: d.value, children: d.label }, d.value);
|
|
2968
3398
|
})
|
|
2969
3399
|
}
|
|
2970
3400
|
),
|
|
2971
|
-
/* @__PURE__ */ (0,
|
|
3401
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2972
3402
|
"select",
|
|
2973
3403
|
{
|
|
2974
3404
|
value: config?.sort?.orderDesc + "",
|
|
2975
|
-
className: "sm:text-ilabel border-main text-text-foreground
|
|
3405
|
+
className: "sm:text-ilabel border-main text-text-foreground hover:border-primary-600 focus:ring-3 focus:ring-primary-600/30 focus:border-primary-600 inline-flex items-center rounded-r-md border border-l-0 pl-4 pr-7",
|
|
2976
3406
|
onChange: (e) => onOrderChange(e.target.value === "true"),
|
|
2977
3407
|
children: orderItems.map((d) => {
|
|
2978
|
-
return /* @__PURE__ */ (0,
|
|
3408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: d.value + "", children: d.label }, d.label);
|
|
2979
3409
|
})
|
|
2980
3410
|
}
|
|
2981
3411
|
)
|
|
@@ -2985,360 +3415,499 @@ function BarGaugeControls({ config, defaultOpen, onChange }) {
|
|
|
2985
3415
|
);
|
|
2986
3416
|
}
|
|
2987
3417
|
|
|
2988
|
-
// src/charts/
|
|
2989
|
-
var
|
|
2990
|
-
var
|
|
2991
|
-
"svg",
|
|
2992
|
-
{
|
|
2993
|
-
width: "14",
|
|
2994
|
-
height: "14",
|
|
2995
|
-
viewBox: "0 0 14 14",
|
|
2996
|
-
fill: "none",
|
|
2997
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2998
|
-
className,
|
|
2999
|
-
children: [
|
|
3000
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("g", { clipPath: "url(#clip0_1774_9563)", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3001
|
-
"path",
|
|
3002
|
-
{
|
|
3003
|
-
d: "M12.6191 13.1249H1.35352C1.21672 13.1249 1.10049 13.0771 1.00483 12.9814C0.909161 12.8857 0.861328 12.7695 0.861328 12.6327V1.35352C0.861328 1.21672 0.909161 1.10049 1.00483 1.00483C1.10049 0.909161 1.21672 0.861328 1.35352 0.861328C1.49031 0.861328 1.60654 0.909161 1.7022 1.00483C1.79787 1.10049 1.8457 1.21672 1.8457 1.35352V12.1405H12.6191C12.7559 12.1405 12.8722 12.1883 12.9678 12.284C13.0635 12.3797 13.1113 12.4959 13.1113 12.6327C13.1113 12.7695 13.0635 12.8857 12.9678 12.9814C12.8722 13.0771 12.7559 13.1249 12.6191 13.1249ZM5.26345 10.1582C5.0902 10.1582 4.95341 10.0853 4.85308 9.93945L2.7067 6.52127C2.63379 6.40285 2.61104 6.27758 2.63845 6.14545C2.66587 6.01333 2.73645 5.91081 2.8502 5.83789C2.96395 5.76497 3.08704 5.74222 3.21945 5.76964C3.35187 5.79706 3.45439 5.86545 3.52702 5.97483L5.05827 8.46333L5.68739 6.04352C5.72385 5.89768 5.81047 5.79283 5.94727 5.72895L8.43576 4.52583C8.55418 4.47099 8.67274 4.45962 8.79145 4.4917C8.91016 4.52379 9.00583 4.59437 9.07845 4.70345L10.3227 6.72689L12.155 1.21702C12.2005 1.08927 12.2826 0.993599 12.4013 0.930016C12.52 0.866432 12.6431 0.857245 12.7705 0.902453C12.898 0.947661 12.9936 1.02977 13.0575 1.14877C13.1214 1.26777 13.1306 1.39085 13.0851 1.51802L10.9247 8.03939C10.8608 8.24006 10.724 8.35177 10.5143 8.37452C10.3046 8.39727 10.1451 8.32202 10.0357 8.14877L8.46333 5.60558L6.59039 6.50814L5.74252 9.78939C5.68768 9.9991 5.55556 10.1177 5.34614 10.1451C5.31872 10.1541 5.29131 10.1586 5.26389 10.1586L5.26345 10.1582Z",
|
|
3004
|
-
fill: "currentColor"
|
|
3005
|
-
}
|
|
3006
|
-
) }),
|
|
3007
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("clipPath", { id: "clip0_1774_9563", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
|
|
3008
|
-
]
|
|
3009
|
-
}
|
|
3010
|
-
);
|
|
3011
|
-
var LineIcon_default = SvgIcon;
|
|
3418
|
+
// src/charts/options/ValueOptions.tsx
|
|
3419
|
+
var import_immer9 = require("immer");
|
|
3420
|
+
var import_ui_core14 = require("@sentio/ui-core");
|
|
3012
3421
|
|
|
3013
|
-
// src/charts/
|
|
3014
|
-
var
|
|
3015
|
-
var
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3422
|
+
// src/charts/options/ValueStringMapping.tsx
|
|
3423
|
+
var import_lu3 = require("react-icons/lu");
|
|
3424
|
+
var import_ui_core13 = require("@sentio/ui-core");
|
|
3425
|
+
var import_immer8 = require("immer");
|
|
3426
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3427
|
+
var operators = {
|
|
3428
|
+
">": "greater than",
|
|
3429
|
+
">=": "greater or equal",
|
|
3430
|
+
"==": "equal",
|
|
3431
|
+
"!=": "not equal",
|
|
3432
|
+
"<": "less than",
|
|
3433
|
+
"<=": "less or equal"
|
|
3434
|
+
};
|
|
3435
|
+
var renderTreeLine = (index, isLast) => {
|
|
3436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "mr-2 flex h-12 w-3 flex-col items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex h-full w-full items-center", children: [
|
|
3437
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3438
|
+
"div",
|
|
3439
|
+
{
|
|
3440
|
+
className: (0, import_ui_core13.classNames)(
|
|
3441
|
+
"w-px bg-gray-300",
|
|
3442
|
+
isLast ? "h-1/2 self-start" : index === 0 ? "h-full self-end" : "h-full"
|
|
3443
|
+
)
|
|
3444
|
+
}
|
|
3445
|
+
),
|
|
3446
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-px w-3 bg-gray-300" })
|
|
3447
|
+
] }) });
|
|
3448
|
+
};
|
|
3449
|
+
function ValueStringMapping({ rules, onChange }) {
|
|
3450
|
+
const addRule = () => {
|
|
3451
|
+
onChange(
|
|
3452
|
+
(0, import_immer8.produce)(rules, (draft) => {
|
|
3453
|
+
draft = draft || [];
|
|
3454
|
+
draft.push({
|
|
3455
|
+
comparison: "==",
|
|
3456
|
+
value: 0,
|
|
3457
|
+
text: ""
|
|
3458
|
+
});
|
|
3459
|
+
})
|
|
3460
|
+
);
|
|
3461
|
+
};
|
|
3462
|
+
function removeRule(index) {
|
|
3463
|
+
onChange(
|
|
3464
|
+
(0, import_immer8.produce)(rules, (draft) => {
|
|
3465
|
+
draft.splice(index, 1);
|
|
3466
|
+
})
|
|
3467
|
+
);
|
|
3034
3468
|
}
|
|
3035
|
-
)
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3469
|
+
function changeRule(index, field, value) {
|
|
3470
|
+
onChange(
|
|
3471
|
+
(0, import_immer8.produce)(rules, (draft) => {
|
|
3472
|
+
;
|
|
3473
|
+
draft[index][field] = value;
|
|
3474
|
+
})
|
|
3475
|
+
);
|
|
3476
|
+
}
|
|
3477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex w-full flex-col rounded-md py-2", children: [
|
|
3478
|
+
(rules || []).map((rule, index) => {
|
|
3479
|
+
const isLast = index === (rules || []).length - 1;
|
|
3480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
3481
|
+
"div",
|
|
3482
|
+
{
|
|
3483
|
+
className: "text-text-foreground flex h-10 items-center py-1",
|
|
3484
|
+
children: [
|
|
3485
|
+
renderTreeLine(index, isLast),
|
|
3486
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "sm:text-ilabel inline-flex h-full items-center pr-3 font-medium", children: "If value is" }),
|
|
3487
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3488
|
+
"select",
|
|
3489
|
+
{
|
|
3490
|
+
value: rule.comparison,
|
|
3491
|
+
onChange: (e) => changeRule(index, "comparison", e.target.value),
|
|
3492
|
+
className: "rounded-r-0 sm:text-ilabel border-main text-text-foreground focus:border-primary-600 focus:ring-3 focus:ring-primary-600/30 inline-flex h-full items-center rounded-l-md border border-r-0 bg-gray-50 py-1 pl-4 pr-7",
|
|
3493
|
+
children: Object.entries(operators).map(([op, display]) => {
|
|
3494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("option", { value: op, children: [
|
|
3495
|
+
"is ",
|
|
3496
|
+
display
|
|
3497
|
+
] }, op);
|
|
3498
|
+
})
|
|
3499
|
+
}
|
|
3500
|
+
),
|
|
3501
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3502
|
+
"input",
|
|
3503
|
+
{
|
|
3504
|
+
type: "text",
|
|
3505
|
+
name: "value",
|
|
3506
|
+
id: "value",
|
|
3507
|
+
className: "w-30 rounded-l-0 sm:text-ilabel border-main hover:border-primary-600 focus:border-primary-600 focus:ring-3 focus:ring-primary-600/30 block h-full rounded-r-md border px-2 py-1",
|
|
3508
|
+
placeholder: "0",
|
|
3509
|
+
value: rule.value,
|
|
3510
|
+
onChange: (e) => {
|
|
3511
|
+
changeRule(index, "value", e.target.value);
|
|
3512
|
+
}
|
|
3513
|
+
}
|
|
3514
|
+
),
|
|
3515
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "sm:text-ilabel inline-flex h-full items-center rounded-none px-3 font-medium", children: ", then show" }),
|
|
3516
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3517
|
+
"input",
|
|
3518
|
+
{
|
|
3519
|
+
type: "text",
|
|
3520
|
+
name: "text",
|
|
3521
|
+
id: "text",
|
|
3522
|
+
className: "sm:text-ilabel border-main hover:border-primary-600 focus:border-primary-600 focus:ring-3 focus:ring-primary-600/30 block h-full w-80 rounded-md px-2 py-1",
|
|
3523
|
+
placeholder: "Display text (e.g. High, Low, Normal)",
|
|
3524
|
+
value: rule.text,
|
|
3525
|
+
onChange: (e) => {
|
|
3526
|
+
changeRule(index, "text", e.target.value);
|
|
3527
|
+
}
|
|
3528
|
+
}
|
|
3529
|
+
),
|
|
3530
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3531
|
+
"button",
|
|
3532
|
+
{
|
|
3533
|
+
type: "button",
|
|
3534
|
+
className: "mx-2",
|
|
3535
|
+
"aria-label": "remove",
|
|
3536
|
+
onClick: () => removeRule(index),
|
|
3537
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3538
|
+
import_lu3.LuTrash2,
|
|
3539
|
+
{
|
|
3540
|
+
className: "icon text-text-foreground-disabled",
|
|
3541
|
+
"aria-hidden": "true"
|
|
3542
|
+
}
|
|
3543
|
+
)
|
|
3544
|
+
}
|
|
3545
|
+
)
|
|
3546
|
+
]
|
|
3547
|
+
},
|
|
3548
|
+
index
|
|
3549
|
+
);
|
|
3550
|
+
}),
|
|
3551
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
3552
|
+
import_ui_core13.Button,
|
|
3051
3553
|
{
|
|
3052
|
-
|
|
3053
|
-
|
|
3554
|
+
type: "button",
|
|
3555
|
+
role: "secondary",
|
|
3556
|
+
className: "mt-1 w-fit flex-none",
|
|
3557
|
+
"aria-label": "remove",
|
|
3558
|
+
onClick: addRule,
|
|
3559
|
+
children: [
|
|
3560
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lu3.LuPlus, { className: (0, import_ui_core13.classNames)("h-4 w-4"), "aria-hidden": "true" }),
|
|
3561
|
+
"Add Formatting Rule"
|
|
3562
|
+
]
|
|
3054
3563
|
}
|
|
3055
3564
|
)
|
|
3056
|
-
}
|
|
3057
|
-
|
|
3058
|
-
var BarIcon_default = SvgIcon3;
|
|
3565
|
+
] });
|
|
3566
|
+
}
|
|
3059
3567
|
|
|
3060
|
-
// src/charts/
|
|
3061
|
-
var
|
|
3062
|
-
var
|
|
3063
|
-
"
|
|
3568
|
+
// src/charts/options/ValueOptions.tsx
|
|
3569
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3570
|
+
var ValueFormatters = [
|
|
3571
|
+
{ label: "Number", value: "NumberFormatter" },
|
|
3572
|
+
{ label: "Date", value: "DateFormatter" },
|
|
3573
|
+
{ label: "String", value: "StringFormatter" }
|
|
3574
|
+
];
|
|
3575
|
+
var defaultConfig3 = {
|
|
3576
|
+
valueFormatter: "NumberFormatter",
|
|
3577
|
+
showValueLabel: false,
|
|
3578
|
+
maxSignificantDigits: 3,
|
|
3579
|
+
dateFormat: "LLL",
|
|
3580
|
+
mappingRules: [],
|
|
3581
|
+
style: "None"
|
|
3582
|
+
};
|
|
3583
|
+
var dateFormats = [
|
|
3584
|
+
{ label: "Localized format", value: "LLL" },
|
|
3585
|
+
{ label: "ISO String", value: "YYYY-MM-DDTHH:mm:ss.sssZ" }
|
|
3586
|
+
];
|
|
3587
|
+
var CurrencySymbols = [
|
|
3588
|
+
{ label: "USD", value: "$" },
|
|
3589
|
+
{ label: "EUR", value: "\u20AC" },
|
|
3590
|
+
{ label: "GBP", value: "\xA3" },
|
|
3591
|
+
{ label: "CNY or JPY", value: "\xA5" },
|
|
3592
|
+
{ label: "BTC", value: "\u0243" },
|
|
3593
|
+
{ label: "ETH", value: "\u039E" }
|
|
3594
|
+
];
|
|
3595
|
+
var AddonLabel = ({
|
|
3596
|
+
className,
|
|
3597
|
+
children
|
|
3598
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3599
|
+
"span",
|
|
3064
3600
|
{
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3601
|
+
className: (0, import_ui_core14.classNames)(
|
|
3602
|
+
"sm:text-ilabel border-main inline-flex items-center whitespace-nowrap bg-gray-50 px-3",
|
|
3603
|
+
className
|
|
3604
|
+
),
|
|
3605
|
+
children
|
|
3606
|
+
}
|
|
3607
|
+
);
|
|
3608
|
+
var ValueOptions = ({
|
|
3609
|
+
config,
|
|
3610
|
+
onChange,
|
|
3611
|
+
formatters = ValueFormatters,
|
|
3612
|
+
showPrefix,
|
|
3613
|
+
showSuffix
|
|
3614
|
+
}) => {
|
|
3615
|
+
function onChangeDateFormat(f) {
|
|
3616
|
+
onChange((0, import_immer9.produce)(config, (draft) => void (draft.dateFormat = f)));
|
|
3617
|
+
}
|
|
3618
|
+
function onChangeFormatter(f) {
|
|
3619
|
+
onChange((0, import_immer9.produce)(config, (draft) => void (draft.valueFormatter = f)));
|
|
3620
|
+
}
|
|
3621
|
+
function onChangeSymbol(symbol) {
|
|
3622
|
+
onChange((0, import_immer9.produce)(config, (draft) => void (draft.currencySymbol = symbol)));
|
|
3623
|
+
}
|
|
3624
|
+
function onStyleChange(notation) {
|
|
3625
|
+
onChange(
|
|
3626
|
+
(0, import_immer9.produce)(config, (draft) => {
|
|
3627
|
+
draft.style = notation;
|
|
3628
|
+
})
|
|
3629
|
+
);
|
|
3630
|
+
}
|
|
3631
|
+
function onDigitsChange(value, option) {
|
|
3632
|
+
onChange(
|
|
3633
|
+
(0, import_immer9.produce)(config, (draft) => {
|
|
3634
|
+
const d = draft;
|
|
3635
|
+
if (value) {
|
|
3636
|
+
const maxSignificantDigits = parseInt(value);
|
|
3637
|
+
if (maxSignificantDigits >= 0 && maxSignificantDigits <= 20) {
|
|
3638
|
+
d[option] = maxSignificantDigits;
|
|
3639
|
+
}
|
|
3640
|
+
} else {
|
|
3641
|
+
delete d[option];
|
|
3077
3642
|
}
|
|
3078
|
-
)
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3643
|
+
})
|
|
3644
|
+
);
|
|
3645
|
+
}
|
|
3646
|
+
function onMappingRulesChange(rules) {
|
|
3647
|
+
onChange((0, import_immer9.produce)(config, (draft) => void (draft.mappingRules = rules)));
|
|
3648
|
+
}
|
|
3649
|
+
function onPrefixChange(value) {
|
|
3650
|
+
onChange(
|
|
3651
|
+
(0, import_immer9.produce)(config, (draft) => {
|
|
3652
|
+
if (value) {
|
|
3653
|
+
draft.prefix = value;
|
|
3654
|
+
} else {
|
|
3655
|
+
delete draft.prefix;
|
|
3084
3656
|
}
|
|
3085
|
-
)
|
|
3086
|
-
|
|
3087
|
-
|
|
3657
|
+
})
|
|
3658
|
+
);
|
|
3659
|
+
}
|
|
3660
|
+
function onSuffixChange(value) {
|
|
3661
|
+
onChange(
|
|
3662
|
+
(0, import_immer9.produce)(config, (draft) => {
|
|
3663
|
+
if (value) {
|
|
3664
|
+
draft.suffix = value;
|
|
3665
|
+
} else {
|
|
3666
|
+
delete draft.suffix;
|
|
3667
|
+
}
|
|
3668
|
+
})
|
|
3669
|
+
);
|
|
3670
|
+
}
|
|
3671
|
+
function numberAddons(style) {
|
|
3672
|
+
switch (style) {
|
|
3673
|
+
case "None":
|
|
3674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
3675
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(AddonLabel, { className: "border border-l-0", children: "Fraction Digits" }),
|
|
3676
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3677
|
+
"input",
|
|
3678
|
+
{
|
|
3679
|
+
disabled: true,
|
|
3680
|
+
className: "focus:border-primary-500 sm:text-ilabel min-w-20 border-main rounded-r-md border border-l-0 py-1",
|
|
3681
|
+
value: ""
|
|
3682
|
+
}
|
|
3683
|
+
)
|
|
3684
|
+
] });
|
|
3685
|
+
case "Percent":
|
|
3686
|
+
case "Standard":
|
|
3687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
3688
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(AddonLabel, { className: "border border-x-0", children: "Fraction Digits" }),
|
|
3689
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3690
|
+
"input",
|
|
3691
|
+
{
|
|
3692
|
+
type: "number",
|
|
3693
|
+
min: 0,
|
|
3694
|
+
max: 20,
|
|
3695
|
+
className: "focus:border-primary-500 sm:text-ilabel min-w-20 border-main focus:ring-3 focus:ring-primary-600/30 hover:border-primary-600 rounded-r-md border py-1",
|
|
3696
|
+
value: config.maxFractionDigits,
|
|
3697
|
+
placeholder: "0-20",
|
|
3698
|
+
onChange: (e) => onDigitsChange(e.target.value, "maxFractionDigits")
|
|
3699
|
+
}
|
|
3700
|
+
)
|
|
3701
|
+
] });
|
|
3702
|
+
case "Currency":
|
|
3703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
3704
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(AddonLabel, { className: "border border-r-0", children: "Symbol" }),
|
|
3705
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-28 ", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3706
|
+
import_ui_core14.ComboInput,
|
|
3707
|
+
{
|
|
3708
|
+
onChange: onChangeSymbol,
|
|
3709
|
+
options: CurrencySymbols.map((s) => s.value),
|
|
3710
|
+
displayFn: (s) => {
|
|
3711
|
+
const name = CurrencySymbols.find((c) => c.value === s)?.label;
|
|
3712
|
+
return `${name} (${s})`;
|
|
3713
|
+
},
|
|
3714
|
+
placeholder: "$",
|
|
3715
|
+
value: config?.currencySymbol
|
|
3716
|
+
}
|
|
3717
|
+
) }),
|
|
3718
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(AddonLabel, { className: "border", children: "Precision" }),
|
|
3719
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3720
|
+
"input",
|
|
3721
|
+
{
|
|
3722
|
+
type: "number",
|
|
3723
|
+
min: 0,
|
|
3724
|
+
max: 20,
|
|
3725
|
+
className: "focus:border-primary-500 sm:text-ilabel min-w-20 border-main rounded-r-md border border-l-0 py-1",
|
|
3726
|
+
value: config.precision,
|
|
3727
|
+
defaultValue: 2,
|
|
3728
|
+
placeholder: "0-20",
|
|
3729
|
+
onChange: (e) => onDigitsChange(e.target.value, "precision")
|
|
3730
|
+
}
|
|
3731
|
+
)
|
|
3732
|
+
] });
|
|
3733
|
+
default:
|
|
3734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
3735
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(AddonLabel, { className: "border border-x-0", children: "Max significant digits" }),
|
|
3736
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3737
|
+
"input",
|
|
3738
|
+
{
|
|
3739
|
+
type: "number",
|
|
3740
|
+
min: 1,
|
|
3741
|
+
max: 21,
|
|
3742
|
+
className: "focus:border-primary-600 sm:text-ilabel min-w-20 border-main hover:border-primary-600 focus:ring-3 focus:ring-primary-600/30 rounded-r-md border py-1",
|
|
3743
|
+
value: config.maxSignificantDigits,
|
|
3744
|
+
placeholder: "1-21",
|
|
3745
|
+
onChange: (e) => onDigitsChange(e.target.value, "maxSignificantDigits")
|
|
3746
|
+
}
|
|
3747
|
+
)
|
|
3748
|
+
] });
|
|
3749
|
+
}
|
|
3750
|
+
}
|
|
3751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
3752
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex", children: [
|
|
3753
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(AddonLabel, { className: "rounded-l-md border border-r-0", children: "Value formatter" }),
|
|
3754
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3755
|
+
"select",
|
|
3088
3756
|
{
|
|
3089
|
-
|
|
3090
|
-
|
|
3757
|
+
value: config.valueFormatter,
|
|
3758
|
+
className: (0, import_ui_core14.classNames)(
|
|
3759
|
+
"sm:text-ilabel border-main text-text-foreground hover:border-primary-600 inline-flex items-center border py-1.5 pl-4 pr-7 focus:ring-0",
|
|
3760
|
+
config.valueFormatter == "StringFormatter" ? "rounded-r-md" : ""
|
|
3761
|
+
),
|
|
3762
|
+
onChange: (e) => onChangeFormatter(e.target.value),
|
|
3763
|
+
children: formatters.map((d) => {
|
|
3764
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: d.value, children: d.label }, d.value);
|
|
3765
|
+
})
|
|
3091
3766
|
}
|
|
3092
3767
|
),
|
|
3093
|
-
/* @__PURE__ */ (0,
|
|
3094
|
-
"
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
fill: "currentColor"
|
|
3098
|
-
}
|
|
3099
|
-
)
|
|
3100
|
-
]
|
|
3101
|
-
}
|
|
3102
|
-
);
|
|
3103
|
-
var BarGuageIcon_default = SvgIcon4;
|
|
3104
|
-
|
|
3105
|
-
// src/charts/icons/PieIcon.tsx
|
|
3106
|
-
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
3107
|
-
var SvgIcon5 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3108
|
-
"svg",
|
|
3109
|
-
{
|
|
3110
|
-
width: "14",
|
|
3111
|
-
height: "14",
|
|
3112
|
-
viewBox: "0 0 14 14",
|
|
3113
|
-
fill: "none",
|
|
3114
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3115
|
-
className,
|
|
3116
|
-
children: [
|
|
3117
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("g", { clipPath: "url(#clip0_28267_7202)", children: [
|
|
3118
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3119
|
-
"path",
|
|
3768
|
+
config.valueFormatter == "NumberFormatter" && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
3769
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(AddonLabel, { className: "border border-l-0 border-r-0", children: "Style" }),
|
|
3770
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3771
|
+
"select",
|
|
3120
3772
|
{
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3773
|
+
value: config.style,
|
|
3774
|
+
className: "sm:text-ilabel border-main text-text-foreground hover:border-primary-600 inline-flex items-center border py-1 pl-4 pr-7 focus:ring-0",
|
|
3775
|
+
onChange: (e) => onStyleChange(e.target.value),
|
|
3776
|
+
children: [
|
|
3777
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: "None", children: "None" }),
|
|
3778
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: "Compact", children: "Compact" }),
|
|
3779
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: "Standard", children: "Standard" }),
|
|
3780
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: "Scientific", children: "Scientific" }),
|
|
3781
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: "Percent", children: "Percent" }),
|
|
3782
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: "Currency", children: "Currency" })
|
|
3783
|
+
]
|
|
3126
3784
|
}
|
|
3127
3785
|
),
|
|
3128
|
-
|
|
3129
|
-
"path",
|
|
3130
|
-
{
|
|
3131
|
-
d: "M8.75 2.04175C9.49067 2.30255 10.1634 2.72617 10.7187 3.28142C11.2739 3.83668 11.6975 4.50941 11.9583 5.25008H9.33333C9.17862 5.25008 9.03025 5.18862 8.92085 5.07923C8.81146 4.96983 8.75 4.82146 8.75 4.66675V2.04175Z",
|
|
3132
|
-
stroke: "currentColor",
|
|
3133
|
-
strokeWidth: "1.16667",
|
|
3134
|
-
strokeLinecap: "round",
|
|
3135
|
-
strokeLinejoin: "round"
|
|
3136
|
-
}
|
|
3137
|
-
)
|
|
3786
|
+
config.style && numberAddons(config.style)
|
|
3138
3787
|
] }),
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
var PieIcon_default = SvgIcon5;
|
|
3144
|
-
|
|
3145
|
-
// src/charts/icons/QueryValueIcon.tsx
|
|
3146
|
-
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
3147
|
-
var SvgIcon6 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3148
|
-
"svg",
|
|
3149
|
-
{
|
|
3150
|
-
width: "14",
|
|
3151
|
-
height: "14",
|
|
3152
|
-
viewBox: "0 0 14 14",
|
|
3153
|
-
fill: "none",
|
|
3154
|
-
className,
|
|
3155
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3156
|
-
children: [
|
|
3157
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("g", { clipPath: "url(#clip0_3670_4424)", children: [
|
|
3158
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3159
|
-
"path",
|
|
3160
|
-
{
|
|
3161
|
-
d: "M11.5 1.5H2.5C1.67157 1.5 1 2.11561 1 2.875V11.125C1 11.8844 1.67157 12.5 2.5 12.5H11.5C12.3284 12.5 13 11.8844 13 11.125V2.875C13 2.11561 12.3284 1.5 11.5 1.5Z",
|
|
3162
|
-
stroke: "currentColor",
|
|
3163
|
-
strokeWidth: "1.16667",
|
|
3164
|
-
strokeLinecap: "round",
|
|
3165
|
-
strokeLinejoin: "round"
|
|
3166
|
-
}
|
|
3167
|
-
),
|
|
3168
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3169
|
-
"path",
|
|
3170
|
-
{
|
|
3171
|
-
d: "M7.98188 5.77273H6.39097L5.75461 5.13636L6.39097 4.5H7.98188L8.61824 5.13636L7.98188 5.77273Z",
|
|
3172
|
-
fill: "currentColor"
|
|
3173
|
-
}
|
|
3174
|
-
),
|
|
3175
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3176
|
-
"path",
|
|
3177
|
-
{
|
|
3178
|
-
d: "M7.98188 11.5H6.39097L5.75461 10.8637L6.39097 10.2273H7.98188L8.61824 10.8637L7.98188 11.5Z",
|
|
3179
|
-
fill: "currentColor"
|
|
3180
|
-
}
|
|
3181
|
-
),
|
|
3182
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3183
|
-
"path",
|
|
3184
|
-
{
|
|
3185
|
-
d: "M8.30005 9.90907V6.09089L8.93641 5.45453L9.57278 6.09089V9.90907L8.93641 10.5454L8.30005 9.90907Z",
|
|
3186
|
-
fill: "currentColor"
|
|
3187
|
-
}
|
|
3188
|
-
),
|
|
3189
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3190
|
-
"path",
|
|
3788
|
+
config.valueFormatter == "DateFormatter" && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
3789
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(AddonLabel, { className: "border border-l-0", children: "Date format" }),
|
|
3790
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3791
|
+
"select",
|
|
3191
3792
|
{
|
|
3192
|
-
|
|
3193
|
-
|
|
3793
|
+
value: config.dateFormat,
|
|
3794
|
+
className: "sm:text-ilabel border-main text-text-foreground inline-flex items-center rounded-r-md border border-l-0 py-1 pl-4 pr-7",
|
|
3795
|
+
onChange: (e) => onChangeDateFormat(e.target.value),
|
|
3796
|
+
children: dateFormats.map((d) => {
|
|
3797
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: d.value, children: d.label }, d.value);
|
|
3798
|
+
})
|
|
3194
3799
|
}
|
|
3195
|
-
)
|
|
3196
|
-
|
|
3197
|
-
|
|
3800
|
+
)
|
|
3801
|
+
] })
|
|
3802
|
+
] }) }),
|
|
3803
|
+
(showPrefix || showSuffix) && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "mt-2 flex items-center gap-4", children: [
|
|
3804
|
+
showPrefix && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "border-main hover:border-primary-600 focus-within:border-primary-600 focus-within:ring-3 focus-within:ring-primary-500/30 text-icontent inline-flex items-center rounded-md border", children: [
|
|
3805
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "h-7.5 leading-7.5 border-r px-3", children: "Prefix" }),
|
|
3806
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3807
|
+
"input",
|
|
3198
3808
|
{
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3809
|
+
type: "text",
|
|
3810
|
+
className: "border-0 px-3 py-1.5 focus:ring-0",
|
|
3811
|
+
value: config.prefix || "",
|
|
3812
|
+
placeholder: "e.g., $, #",
|
|
3813
|
+
onChange: (e) => onPrefixChange(e.target.value)
|
|
3204
3814
|
}
|
|
3205
3815
|
)
|
|
3206
3816
|
] }),
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
var QueryValueIcon_default = SvgIcon6;
|
|
3212
|
-
|
|
3213
|
-
// src/charts/icons/ScatterIcon.tsx
|
|
3214
|
-
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
3215
|
-
var SvgIcon7 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3216
|
-
"svg",
|
|
3217
|
-
{
|
|
3218
|
-
width: "14",
|
|
3219
|
-
height: "14",
|
|
3220
|
-
viewBox: "0 0 14 14",
|
|
3221
|
-
fill: "none",
|
|
3222
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3223
|
-
className,
|
|
3224
|
-
children: [
|
|
3225
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("g", { clipPath: "url(#clip0_28248_7302)", children: [
|
|
3226
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3227
|
-
"path",
|
|
3228
|
-
{
|
|
3229
|
-
d: "M1.75 1.75V12.25H12.25",
|
|
3230
|
-
stroke: "currentColor",
|
|
3231
|
-
strokeWidth: "1.16667",
|
|
3232
|
-
strokeLinecap: "round",
|
|
3233
|
-
strokeLinejoin: "round"
|
|
3234
|
-
}
|
|
3235
|
-
),
|
|
3236
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3237
|
-
"path",
|
|
3238
|
-
{
|
|
3239
|
-
d: "M4.66663 8.75879V8.76754",
|
|
3240
|
-
stroke: "currentColor",
|
|
3241
|
-
strokeWidth: "1.16667",
|
|
3242
|
-
strokeLinecap: "round",
|
|
3243
|
-
strokeLinejoin: "round"
|
|
3244
|
-
}
|
|
3245
|
-
),
|
|
3246
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3247
|
-
"path",
|
|
3248
|
-
{
|
|
3249
|
-
d: "M9.33337 9.34204V9.35079",
|
|
3250
|
-
stroke: "currentColor",
|
|
3251
|
-
strokeWidth: "1.16667",
|
|
3252
|
-
strokeLinecap: "round",
|
|
3253
|
-
strokeLinejoin: "round"
|
|
3254
|
-
}
|
|
3255
|
-
),
|
|
3256
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3257
|
-
"path",
|
|
3258
|
-
{
|
|
3259
|
-
d: "M4.66663 4.10083V4.10958",
|
|
3260
|
-
stroke: "currentColor",
|
|
3261
|
-
strokeWidth: "1.16667",
|
|
3262
|
-
strokeLinecap: "round",
|
|
3263
|
-
strokeLinejoin: "round"
|
|
3264
|
-
}
|
|
3265
|
-
),
|
|
3266
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3267
|
-
"path",
|
|
3268
|
-
{
|
|
3269
|
-
d: "M7 6.43408V6.44283",
|
|
3270
|
-
stroke: "currentColor",
|
|
3271
|
-
strokeWidth: "1.16667",
|
|
3272
|
-
strokeLinecap: "round",
|
|
3273
|
-
strokeLinejoin: "round"
|
|
3274
|
-
}
|
|
3275
|
-
),
|
|
3276
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3277
|
-
"path",
|
|
3817
|
+
showSuffix && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "border-main hover:border-primary-600 focus-within:border-primary-600 focus-within:ring-3 focus-within:ring-primary-500/30 text-icontent inline-flex items-center rounded-md border", children: [
|
|
3818
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "h-7.5 leading-7.5 border-r px-3", children: "Suffix" }),
|
|
3819
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3820
|
+
"input",
|
|
3278
3821
|
{
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3822
|
+
type: "text",
|
|
3823
|
+
className: "min-w-32 border-0 px-3 py-1.5 focus:ring-0",
|
|
3824
|
+
value: config.suffix || "",
|
|
3825
|
+
placeholder: "e.g., %, USD, tokens",
|
|
3826
|
+
onChange: (e) => onSuffixChange(e.target.value)
|
|
3284
3827
|
}
|
|
3285
3828
|
)
|
|
3286
|
-
] })
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3829
|
+
] })
|
|
3830
|
+
] }) }),
|
|
3831
|
+
config.valueFormatter == "StringFormatter" && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3832
|
+
ValueStringMapping,
|
|
3833
|
+
{
|
|
3834
|
+
rules: config.mappingRules || [],
|
|
3835
|
+
onChange: onMappingRulesChange
|
|
3836
|
+
}
|
|
3837
|
+
)
|
|
3838
|
+
] });
|
|
3839
|
+
};
|
|
3292
3840
|
|
|
3293
|
-
// src/charts/
|
|
3294
|
-
var
|
|
3295
|
-
var
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3841
|
+
// src/charts/options/ValueControls.tsx
|
|
3842
|
+
var import_lodash5 = require("lodash");
|
|
3843
|
+
var import_ui_core15 = require("@sentio/ui-core");
|
|
3844
|
+
var import_immer10 = require("immer");
|
|
3845
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3846
|
+
var defaultConfig4 = {
|
|
3847
|
+
valueFormatter: "NumberFormatter",
|
|
3848
|
+
showValueLabel: false,
|
|
3849
|
+
maxSignificantDigits: 3,
|
|
3850
|
+
dateFormat: "LLL",
|
|
3851
|
+
mappingRules: [],
|
|
3852
|
+
style: "None",
|
|
3853
|
+
maxFractionDigits: 2
|
|
3854
|
+
};
|
|
3855
|
+
var ValueControls = ({
|
|
3856
|
+
config,
|
|
3857
|
+
defaultOpen,
|
|
3858
|
+
onChange,
|
|
3859
|
+
formatters = ValueFormatters,
|
|
3860
|
+
showPrefix,
|
|
3861
|
+
showSuffix
|
|
3862
|
+
}) => {
|
|
3863
|
+
config = (0, import_lodash5.defaults)(config || {}, defaultConfig4);
|
|
3864
|
+
function toggleShowValueLabel(checked) {
|
|
3865
|
+
config && onChange(
|
|
3866
|
+
(0, import_immer10.produce)(config, (draft) => void (draft.showValueLabel = checked))
|
|
3867
|
+
);
|
|
3868
|
+
}
|
|
3869
|
+
function toggleTooltipTotal(checked) {
|
|
3870
|
+
config && onChange((0, import_immer10.produce)(config, (draft) => void (draft.tooltipTotal = checked)));
|
|
3871
|
+
}
|
|
3872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3873
|
+
import_ui_core15.DisclosurePanel,
|
|
3874
|
+
{
|
|
3875
|
+
title: "Value Options",
|
|
3876
|
+
defaultOpen,
|
|
3877
|
+
containerClassName: "w-full bg-default-bg",
|
|
3878
|
+
children: [
|
|
3879
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3880
|
+
ValueOptions,
|
|
3318
3881
|
{
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3882
|
+
onChange,
|
|
3883
|
+
config,
|
|
3884
|
+
formatters,
|
|
3885
|
+
showPrefix,
|
|
3886
|
+
showSuffix
|
|
3324
3887
|
}
|
|
3325
3888
|
),
|
|
3326
|
-
/* @__PURE__ */ (0,
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3889
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "mt-2 flex items-center gap-2", children: [
|
|
3890
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3891
|
+
import_ui_core15.Checkbox,
|
|
3892
|
+
{
|
|
3893
|
+
checked: config?.showValueLabel,
|
|
3894
|
+
onChange: toggleShowValueLabel,
|
|
3895
|
+
label: "Show value label"
|
|
3896
|
+
}
|
|
3897
|
+
),
|
|
3898
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3899
|
+
import_ui_core15.Checkbox,
|
|
3900
|
+
{
|
|
3901
|
+
checked: config?.tooltipTotal,
|
|
3902
|
+
onChange: toggleTooltipTotal,
|
|
3903
|
+
label: "Show total in tooltip"
|
|
3904
|
+
}
|
|
3905
|
+
)
|
|
3906
|
+
] })
|
|
3907
|
+
]
|
|
3908
|
+
}
|
|
3909
|
+
);
|
|
3910
|
+
};
|
|
3342
3911
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3343
3912
|
0 && (module.exports = {
|
|
3344
3913
|
AggregateInput,
|
|
@@ -3349,6 +3918,7 @@ var TableIcon_default = SvgIcon8;
|
|
|
3349
3918
|
BarGuageIcon,
|
|
3350
3919
|
BarIcon,
|
|
3351
3920
|
ChartLegend,
|
|
3921
|
+
ChartTypeButtonGroup,
|
|
3352
3922
|
EventsFunctionCategories,
|
|
3353
3923
|
EventsFunctionMap,
|
|
3354
3924
|
FunctionInput,
|
|
@@ -3369,8 +3939,14 @@ var TableIcon_default = SvgIcon8;
|
|
|
3369
3939
|
ScatterIcon,
|
|
3370
3940
|
SystemLabels,
|
|
3371
3941
|
TableIcon,
|
|
3942
|
+
ValueControls,
|
|
3943
|
+
ValueFormatters,
|
|
3944
|
+
ValueOptions,
|
|
3945
|
+
ValueStringMapping,
|
|
3372
3946
|
defaultBarGaugeConfig,
|
|
3373
3947
|
defaultPieConfig,
|
|
3948
|
+
defaultValueConfig,
|
|
3949
|
+
defaultValueControlsConfig,
|
|
3374
3950
|
isAggrOrRollupFunction,
|
|
3375
3951
|
sentioColors,
|
|
3376
3952
|
sentioTheme,
|